RS Aggarwal Class 12 Maths Solutions Exercise 30 — Bayes’ Theorem and Its Applications
RS Aggarwal, Class 12 Mathematics — Bayes’ Theorem and Its Applications, Exercise 30. All 18 questions solved.
Independent solutions by Shiwam’s Classes. Not affiliated with or endorsed by the author or publisher of the book.
Every question in this exercise has the same shape. There are several possible sources (machines, bags, urns, plants), one of which is chosen or responsible, and an observed result such as a defective bulb or a white ball. We are asked to work backwards from the result to the source. The sources are written $E_1, E_2, \dots$ and the observed result $E$.
Key insight. Multiply, for each source, the chance of that source by the chance of the result given that source. The answer is the target source’s product divided by the sum of all the products: $P(E_k\mid E)=\dfrac{P(E_k)P(E\mid E_k)}{\sum_i P(E_i)P(E\mid E_i)}$. The denominator is just $P(E)$, found by the total probability rule, so always check that the priors add to $1$.
Question 1
Three machines $A$, $B$ and $C$ make 60%, 25% and 15% of all the bulbs a factory turns out. The fractions of their own output that are faulty are 1%, 2% and 1% in that order. One bulb is picked from the whole stock and turns out faulty. Find the chance that machine $C$ made it.
Solution. Let $E$ be the event that the bulb is defective. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: A, $E_2$: B, $E_3$: C).
Priors and likelihoods:
- $P(E_1)=\frac{3}{5}$ and $P(E\mid E_1)=\frac{1}{100}$, because 1% of $A$’s bulbs are faulty.
- $P(E_2)=\frac{1}{4}$ and $P(E\mid E_2)=\frac{1}{50}$, because 2% of $B$’s bulbs are faulty.
- $P(E_3)=\frac{3}{20}$ and $P(E\mid E_3)=\frac{1}{100}$, because 1% of $C$’s bulbs are faulty.
By Bayes’ theorem,
$$P(E_3\mid E)=\frac{P(E_3)P(E\mid E_3)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{2000}}{\frac{3}{500}+\frac{1}{200}+\frac{3}{2000}}=\frac{\frac{3}{2000}}{\frac{1}{80}}=\frac{3}{25}.$$
$P(E_3\mid E)=\frac{3}{25}$
Question 2
A firm makes scooters in plants $A$ and $B$, which supply 80% and 20% of its output. Of the scooters from $A$, 85% meet the standard quality, and of those from $B$, 65% do. A scooter chosen at random from the firm’s output is of standard quality. Find the probability that plant $A$ made it.
Solution. Let $E$ be the event that the scooter is of standard quality. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: A, $E_2$: B).
Priors and likelihoods:
- $P(E_1)=\frac{4}{5}$ and $P(E\mid E_1)=\frac{17}{20}$, because 85% of plant $A$’s scooters are standard.
- $P(E_2)=\frac{1}{5}$ and $P(E\mid E_2)=\frac{13}{20}$, because 65% of plant $B$’s scooters are standard.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{17}{25}}{\frac{17}{25}+\frac{13}{100}}=\frac{\frac{17}{25}}{\frac{81}{100}}=\frac{68}{81}.$$
$P(E_1\mid E)=\frac{68}{81}$
Question 3
Girls form 60% of a college’s students. Only 4% of the boys and 1% of the girls stand above 1.75 metres. Someone tall (over 1.75 m) is met by chance; what is the probability that this person is a girl?
Solution. Let $E$ be the event that the student is taller than 1.75 m. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: Boy, $E_2$: Girl).
Priors and likelihoods:
- $P(E_1)=\frac{2}{5}$ and $P(E\mid E_1)=\frac{1}{25}$, because 4% of boys are taller than 1.75 m.
- $P(E_2)=\frac{3}{5}$ and $P(E\mid E_2)=\frac{1}{100}$, because 1% of girls are taller than 1.75 m.
By Bayes’ theorem,
$$P(E_2\mid E)=\frac{P(E_2)P(E\mid E_2)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{500}}{\frac{2}{125}+\frac{3}{500}}=\frac{\frac{3}{500}}{\frac{11}{500}}=\frac{3}{11}.$$
$P(E_2\mid E)=\frac{3}{11}$
Question 4
In a class 60% of the students are boys. Among the boys 5% have an IQ above 150, and among the girls 10% do. A student chosen at random has an IQ above 150. Find the probability that this student is a boy.
Solution. Let $E$ be the event that the student has IQ above 150. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: Boy, $E_2$: Girl).
Priors and likelihoods:
- $P(E_1)=\frac{3}{5}$ and $P(E\mid E_1)=\frac{1}{20}$, because 5% of boys have IQ above 150.
- $P(E_2)=\frac{2}{5}$ and $P(E\mid E_2)=\frac{1}{10}$, because 10% of girls have IQ above 150.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{100}}{\frac{3}{100}+\frac{1}{25}}=\frac{\frac{3}{100}}{\frac{7}{100}}=\frac{3}{7}.$$
$P(E_1\mid E)=\frac{3}{7}$
Question 5
Of all men 5% have grey hair, and of all women 0.25% do. The numbers of men and women are equal. A person with grey hair is chosen at random. Find the probability that the person is a man.
Solution. Let $E$ be the event that the person has grey hair. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: Male, $E_2$: Female).
Priors and likelihoods:
- $P(E_1)=\frac{1}{2}$ and $P(E\mid E_1)=\frac{1}{20}$, because 5% of men have grey hair.
- $P(E_2)=\frac{1}{2}$ and $P(E\mid E_2)=\frac{1}{400}$, because 0.25% of women have grey hair.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{40}}{\frac{1}{40}+\frac{1}{800}}=\frac{\frac{1}{40}}{\frac{21}{800}}=\frac{20}{21}.$$
$P(E_1\mid E)=\frac{20}{21}$
Question 6
Two groups contest seats on a corporation’s board and win with probabilities 0.6 and 0.4. If the first group wins, a new product is launched with probability 0.7, and if the second wins, with probability 0.3. Given that a new product was launched, find the probability that the second group was responsible.
Solution. Let $E$ be the event that a new product is introduced. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: G1, $E_2$: G2).
Priors and likelihoods:
- $P(E_1)=\frac{3}{5}$ and $P(E\mid E_1)=\frac{7}{10}$, because the first group introduces it with probability $0.7$.
- $P(E_2)=\frac{2}{5}$ and $P(E\mid E_2)=\frac{3}{10}$, because the second group introduces it with probability $0.3$.
By Bayes’ theorem,
$$P(E_2\mid E)=\frac{P(E_2)P(E\mid E_2)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{25}}{\frac{21}{50}+\frac{3}{25}}=\frac{\frac{3}{25}}{\frac{27}{50}}=\frac{2}{9}.$$
$P(E_2\mid E)=\frac{2}{9}$
Question 7
Bag $A$ holds 1 white and 6 red balls and a second bag holds 4 white and 3 red balls. A bag is picked at random and one ball drawn from it is white. Find the probability that the ball came from bag $A$.
Solution. Let $E$ be the event that the ball drawn is white. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: A, $E_2$: B).
Priors and likelihoods:
- $P(E_1)=\frac{1}{2}$ and $P(E\mid E_1)=\frac{1}{7}$, because bag $A$ has 1 white ball among 7.
- $P(E_2)=\frac{1}{2}$ and $P(E\mid E_2)=\frac{4}{7}$, because the other bag has 4 white balls among 7.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{14}}{\frac{1}{14}+\frac{2}{7}}=\frac{\frac{1}{14}}{\frac{5}{14}}=\frac{1}{5}.$$
$P(E_1\mid E)=\frac{1}{5}$
Question 8
Bag I has 3 white and 4 black balls; bag II has 5 white and 6 black balls. A bag is chosen at random, a ball is drawn, and it is white. Find the probability that it came from bag I.
Solution. Let $E$ be the event that the ball drawn is white. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: I, $E_2$: II).
Priors and likelihoods:
- $P(E_1)=\frac{1}{2}$ and $P(E\mid E_1)=\frac{3}{7}$, because bag I has 3 white balls among 7.
- $P(E_2)=\frac{1}{2}$ and $P(E\mid E_2)=\frac{5}{11}$, because bag II has 5 white balls among 11.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{14}}{\frac{3}{14}+\frac{5}{22}}=\frac{\frac{3}{14}}{\frac{34}{77}}=\frac{33}{68}.$$
$P(E_1\mid E)=\frac{33}{68}$
Question 9
Of two boxes, the first has 2 gold and 3 silver coins while the second has 3 gold and 3 silver. Choosing a box by chance, we take out a coin and see that it is gold. What is the chance the coin came out of the second box?
Solution. Let $E$ be the event that the coin drawn is gold. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: Box 1, $E_2$: Box 2).
Priors and likelihoods:
- $P(E_1)=\frac{1}{2}$ and $P(E\mid E_1)=\frac{2}{5}$, because box 1 has 2 gold coins among 5.
- $P(E_2)=\frac{1}{2}$ and $P(E\mid E_2)=\frac{1}{2}$, because box 2 has 3 gold coins among 6.
By Bayes’ theorem,
$$P(E_2\mid E)=\frac{P(E_2)P(E\mid E_2)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{4}}{\frac{1}{5}+\frac{1}{4}}=\frac{\frac{1}{4}}{\frac{9}{20}}=\frac{5}{9}.$$
$P(E_2\mid E)=\frac{5}{9}$
Question 10
The contents of three urns are: $A$ with 6 red and 4 white balls, $B$ with 2 red and 6 white, $C$ with 1 red and 5 white. One urn is selected by chance and a red ball comes out. What is the probability that urn $A$ was the one selected?
Solution. Let $E$ be the event that the ball drawn is red. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: A, $E_2$: B, $E_3$: C).
Priors and likelihoods:
- $P(E_1)=\frac{1}{3}$ and $P(E\mid E_1)=\frac{3}{5}$, because urn $A$ has 6 red balls among 10.
- $P(E_2)=\frac{1}{3}$ and $P(E\mid E_2)=\frac{1}{4}$, because urn $B$ has 2 red balls among 8.
- $P(E_3)=\frac{1}{3}$ and $P(E\mid E_3)=\frac{1}{6}$, because urn $C$ has 1 red ball among 6.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{5}}{\frac{1}{5}+\frac{1}{12}+\frac{1}{18}}=\frac{\frac{1}{5}}{\frac{61}{180}}=\frac{36}{61}.$$
$P(E_1\mid E)=\frac{36}{61}$
Question 11
Three urns hold 2 white and 3 black; 3 white and 2 black; and 4 white and 1 black balls. An urn is picked at random and a white ball is drawn. Find the probability that the first urn was the one used.
Solution. Let $E$ be the event that the ball drawn is white. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: U1, $E_2$: U2, $E_3$: U3).
Priors and likelihoods:
- $P(E_1)=\frac{1}{3}$ and $P(E\mid E_1)=\frac{2}{5}$, because urn 1 has 2 white balls among 5.
- $P(E_2)=\frac{1}{3}$ and $P(E\mid E_2)=\frac{3}{5}$, because urn 2 has 3 white balls among 5.
- $P(E_3)=\frac{1}{3}$ and $P(E\mid E_3)=\frac{4}{5}$, because urn 3 has 4 white balls among 5.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{2}{15}}{\frac{2}{15}+\frac{1}{5}+\frac{4}{15}}=\frac{\frac{2}{15}}{\frac{3}{5}}=\frac{2}{9}.$$
$P(E_1\mid E)=\frac{2}{9}$
Question 12
Box 1 has 1 white, 2 red, 3 black balls; box 2 has 2 white, 3 red, 1 black; box 3 has 3 white, 1 red, 2 black. A box is chosen at random and two balls are taken from it, one red and one white. Find the probability that the box was the second one.
Solution. Let $E$ be the event that the two balls drawn are one red and one white. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: Box 1, $E_2$: Box 2, $E_3$: Box 3).
Priors and likelihoods:
- $P(E_1)=\frac{1}{3}$ and $P(E\mid E_1)=\frac{2}{15}$, because one red and one white from box 1 can be chosen in $2\times1=2$ ways out of $\binom{6}{2}=15$.
- $P(E_2)=\frac{1}{3}$ and $P(E\mid E_2)=\frac{2}{5}$, because from box 2 it is $3\times2=6$ ways out of $\binom{6}{2}=15$.
- $P(E_3)=\frac{1}{3}$ and $P(E\mid E_3)=\frac{1}{5}$, because from box 3 it is $1\times3=3$ ways out of $\binom{6}{2}=15$.
By Bayes’ theorem,
$$P(E_2\mid E)=\frac{P(E_2)P(E\mid E_2)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{2}{15}}{\frac{2}{45}+\frac{2}{15}+\frac{1}{15}}=\frac{\frac{2}{15}}{\frac{11}{45}}=\frac{6}{11}.$$
$P(E_2\mid E)=\frac{6}{11}$
Question 13
Urn $A$ has 7 white and 3 black balls, urn $B$ has 4 white and 6 black, urn $C$ has 2 white and 8 black. The urns are chosen with probabilities 0.2, 0.6 and 0.2. Two balls are drawn without replacement from the chosen urn and both are white. Find the probability that urn $C$ was used.
Solution. Let $E$ be the event that both balls drawn are white. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: A, $E_2$: B, $E_3$: C).
Priors and likelihoods:
- $P(E_1)=\frac{1}{5}$ and $P(E\mid E_1)=\frac{7}{15}$, because two whites from urn $A$: $\binom72\big/\binom{10}2=\frac{21}{45}$.
- $P(E_2)=\frac{3}{5}$ and $P(E\mid E_2)=\frac{2}{15}$, because two whites from urn $B$: $\binom42\big/\binom{10}2=\frac{6}{45}$.
- $P(E_3)=\frac{1}{5}$ and $P(E\mid E_3)=\frac{1}{45}$, because two whites from urn $C$: $\binom22\big/\binom{10}2=\frac{1}{45}$.
By Bayes’ theorem,
$$P(E_3\mid E)=\frac{P(E_3)P(E\mid E_3)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{225}}{\frac{7}{75}+\frac{2}{25}+\frac{1}{225}}=\frac{\frac{1}{225}}{\frac{8}{45}}=\frac{1}{40}.$$
$P(E_3\mid E)=\frac{1}{40}$
Question 14
Five bags are on a table. Three of them (the first group) each contain 5 white and 3 black balls, and the other two (the second group) each contain 2 white and 4 black balls. A white ball turns up when one is drawn at random. What is the probability that its bag belongs to the first group?
Solution. Let $E$ be the event that the ball drawn is white. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: G1, $E_2$: G2). Choosing a bag at random out of the five bags gives the two groups prior probabilities $\frac35$ and $\frac25$.
Priors and likelihoods:
- $P(E_1)=\frac{3}{5}$ and $P(E\mid E_1)=\frac{5}{8}$, because a first-group bag has 5 white balls among 8.
- $P(E_2)=\frac{2}{5}$ and $P(E\mid E_2)=\frac{1}{3}$, because a second-group bag has 2 white balls among 6.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{8}}{\frac{3}{8}+\frac{2}{15}}=\frac{\frac{3}{8}}{\frac{61}{120}}=\frac{45}{61}.$$
$P(E_1\mid E)=\frac{45}{61}$
Question 15
Boxes $A$, $B$, $C$, $D$ hold marbles as follows: $A$ has 1 red, 6 white, 3 black; $B$ has 6 red, 2 white, 2 black; $C$ has 8 red, 1 white, 1 black; $D$ has 6 white and 4 black. A box is selected at random and a red marble is drawn. Find the probability that it came from $A$.
Solution. Let $E$ be the event that the marble drawn is red. Call the 4 possible sources $E_1,\dots,E_4$ ($E_1$: A, $E_2$: B, $E_3$: C, $E_4$: D).
Priors and likelihoods:
- $P(E_1)=\frac{1}{4}$ and $P(E\mid E_1)=\frac{1}{10}$, because box $A$ has 1 red among 10.
- $P(E_2)=\frac{1}{4}$ and $P(E\mid E_2)=\frac{3}{5}$, because box $B$ has 6 red among 10.
- $P(E_3)=\frac{1}{4}$ and $P(E\mid E_3)=\frac{4}{5}$, because box $C$ has 8 red among 10.
- $P(E_4)=\frac{1}{4}$ and $P(E\mid E_4)=0$, because box $D$ has no red marble.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{1}{40}}{\frac{1}{40}+\frac{3}{20}+\frac{1}{5}+0}=\frac{\frac{1}{40}}{\frac{3}{8}}=\frac{1}{15}.$$
$P(E_1\mid E)=\frac{1}{15}$
Question 16
Plant $X$ makes 70% of a factory’s cars and plant $Y$ makes the other 30%. 80% of $X$’s cars and 90% of $Y$’s cars are of standard quality. A car picked at random is of standard quality. Find the probability that it came from plant $X$.
Solution. Let $E$ be the event that the car is of standard quality. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: X, $E_2$: Y).
Priors and likelihoods:
- $P(E_1)=\frac{7}{10}$ and $P(E\mid E_1)=\frac{4}{5}$, because 80% of plant $X$’s cars are standard.
- $P(E_2)=\frac{3}{10}$ and $P(E\mid E_2)=\frac{9}{10}$, because 90% of plant $Y$’s cars are standard.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{14}{25}}{\frac{14}{25}+\frac{27}{100}}=\frac{\frac{14}{25}}{\frac{83}{100}}=\frac{56}{83}.$$
$P(E_1\mid E)=\frac{56}{83}$
Question 17
An insurer covers 2000 scooters and 3000 motorcycles. A scooter has an accident with probability 0.01 and a motorcycle with probability 0.02. One insured vehicle had an accident. Find the probability that it was a motorcycle.
Solution. Let $E$ be the event that the vehicle meets with an accident. Call the 2 possible sources $E_1,\dots,E_2$ ($E_1$: Scooter, $E_2$: Motorcycle). A vehicle chosen from the 5000 insured is a scooter with probability $\frac{2000}{5000}$ and a motorcycle with probability $\frac{3000}{5000}$.
Priors and likelihoods:
- $P(E_1)=\frac{2}{5}$ and $P(E\mid E_1)=\frac{1}{100}$, because a scooter has an accident with probability $0.01$.
- $P(E_2)=\frac{3}{5}$ and $P(E\mid E_2)=\frac{1}{50}$, because a motorcycle has an accident with probability $0.02$.
By Bayes’ theorem,
$$P(E_2\mid E)=\frac{P(E_2)P(E\mid E_2)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{250}}{\frac{1}{250}+\frac{3}{250}}=\frac{\frac{3}{250}}{\frac{2}{125}}=\frac{3}{4}.$$
$P(E_2\mid E)=\frac{3}{4}$
Question 18
Machines $A$, $B$, $C$ produce 60%, 30% and 10% of the bulbs, and 1%, 2% and 3% of their respective bulbs are defective. A bulb chosen at random from the whole output is defective. Find the probability that machine $A$ made it.
Solution. Let $E$ be the event that the bulb is defective. Call the 3 possible sources $E_1,\dots,E_3$ ($E_1$: A, $E_2$: B, $E_3$: C).
Priors and likelihoods:
- $P(E_1)=\frac{3}{5}$ and $P(E\mid E_1)=\frac{1}{100}$, because 1% of $A$’s bulbs are defective.
- $P(E_2)=\frac{3}{10}$ and $P(E\mid E_2)=\frac{1}{50}$, because 2% of $B$’s bulbs are defective.
- $P(E_3)=\frac{1}{10}$ and $P(E\mid E_3)=\frac{3}{100}$, because 3% of $C$’s bulbs are defective.
By Bayes’ theorem,
$$P(E_1\mid E)=\frac{P(E_1)P(E\mid E_1)}{\sum_i P(E_i)P(E\mid E_i)}=\frac{\frac{3}{500}}{\frac{3}{500}+\frac{3}{500}+\frac{3}{1000}}=\frac{\frac{3}{500}}{\frac{3}{200}}=\frac{2}{5}.$$
$P(E_1\mid E)=\frac{2}{5}$
Common mistakes
- Answering with the likelihood instead of the reversed probability. In Question 1, $P(\text{defective}\mid C)=\frac{1}{100}$ is not the answer; the required quantity is $P(C\mid\text{defective})=\frac{3}{25}$, which also depends on how much of the output $C$ makes.
- Treating the sources as equally likely when the question gives unequal shares (Questions 1, 2, 13, 14, 17). Question 14 has five bags, so the groups carry $\frac35$ and $\frac25$, not $\frac12$ each.
- Using one-ball chances in the two-ball questions. Questions 12 and 13 need combinations, for example $\binom{7}{2}\big/\binom{10}{2}$, since both balls come from the same urn without replacement.
- Mixing percentages and decimals, as in Question 5, where $0.25\%=0.0025$, not $0.25$.
- Forgetting a source whose likelihood is zero. In Question 15 box $D$ has no red marble; it contributes $0$ to the denominator but is still one of the four equally likely boxes.
Practise next
Two machines make 50% each of the items in a store. Machine 1 makes 2% defective and machine 2 makes 4% defective. An item is picked at random and is defective. Find the probability that machine 2 made it.
Show answer
$\frac{2}{3}$. The products are $0.5\times0.02=0.01$ and $0.5\times0.04=0.02$, so the answer is $\frac{0.02}{0.03}=\frac23$.
Shiwam's Classes: IIT JEEJEE Main and Advanced, worked in full
Subscribe