Probability
    9.0 Bayes' Theorem

9.0 Bayes' Theorem
Let ${A_1},{A_2},....,{A_n}$ be a set of mutually exclusive and exhaustive events and $B$ an event occurs. Then the conditional probability that ${{A_i}}$ happens given that $B$ has happened is given by $$P({A_i}/B) = {{P({A_i} \cap B)} \over {P(B)}} = {{P({A_i})P(B/{A_i})} \over {\sum\limits_{i = 1}^n {P({A_i})} P(B/{A_i})}}$$

Proof: $$\begin{equation} \begin{aligned} P({A_i} \cap B) \\ = P({A_i}/B)P(B) \\ = P({A_i})P(B/{A_i}) \\ P({A_i}/B) = {{P({A_i} \cap B)} \over {P(B)}} \\ By\;total\;probability\;theorem, \\ P(B) = \sum\limits_{i = 1}^n {P({A_i})} P(B/{A_i}) \\ Thus, \\ P({A_i}/B) \\ = {{P({A_i} \cap B)} \over {P(B)}} \\ = {{P({A_i} \cap B)} \over {\sum\limits_{i = 1}^n {P({A_i})} P(B/{A_i})}} \\ = {{P({A_i})P(B/{A_i})} \over {\sum\limits_{i = 1}^n {P({A_i})} P(B/{A_i})}} \\\end{aligned} \end{equation} $$



Illustration 37. In a test, a candidate either guesses or copies or knows the answer to a multiple choice question with four choices. The probability that he makes a guess is ${1 \over 3}$ and the probability that he copies is ${1 \over 6}$. The probability that his answer is correct, given that he copied is ${1 \over 8}$. Find the probability that he knew the answer to the question, given that he answered correctly.

Solution: Let the events be,
${E_1}$ = Candidate guesses the answer.
Thus,
$$P({E_1}) = {1 \over 3}$$
${E_2}$ = Candidate copies the answer. Thus,
$$P({E_2}) = {1 \over 6}$$
${E_3}$ = Candidate knows the answer.
As, these three are mutually exclusive and exhaustive events,
$$\begin{equation} \begin{aligned} P({E_1}) + P({E_2}) + P({E_3}) = 1 \\ \Rightarrow P({E_3}) = 1 - [P({E_1}) + P({E_2})] \\ \Rightarrow P({E_3}) = 1 - {1 \over 3} - {1 \over 6} \\ \Rightarrow P({E_3}) = {1 \over 2} \\\end{aligned} \end{equation} $$

$A$ is the event that he answers correctly

If ${E_1}$ has already occurred, then he has four options out of which only one is correct.
So the probability that he answers correctly is $${1 \over 4}$$
i.e.
$$P(A/{E_1}) = {1 \over 4}$$
and also
$$P(A/{E_2}) = {1 \over 8}$$
and probability that he answers correctly given that he knows the answer is $1$

By Bayes' probability theorem,
Probability that he knew the answer, given that it is correct is
$$\begin{equation} \begin{aligned} P({E_3}/A) = {{P({E_3})P(A/{E_3})} \over {P({E_1})P(A/{E_1}) + P({E_2})P(A/{E_2}) + P({E_3})P(A/{E_3})}} \\ P({E_3}/A) = {{{1 \over 2} \times 1} \over {{1 \over 3} \times {1 \over 4} + {1 \over 6} \times {1 \over 8} + {1 \over 2} \times 1}} \\ P({E_3}/A) = {{24} \over {29}} \\\end{aligned} \end{equation} $$


Illustration 38. A company has two plants to manufacture scooters. Plant $1$ manufactures $70\%$ of them and the rest is manufactured by Plant $2$. At Plant $1$, $80\%$ of the scooters are rated as of standard quality and at Plant $2$, $90\%$ of the scooters are rated as of standard quality. A scooter is chosen at random and is found to be of standard quality. What is the probability it has come from plant $2$ ?

Solution: Let the events be,
${E_1}$ - Plant $1$ is chosen
${E_2}$ - Plant $2$ is chosen
$A$ - The scooter is of a standard quality.
Given,
Probability that plant $1$ is chosen $$P({E_1}) = {{70} \over {100}}$$
Probability that plant $2$ is chosen $$P({E_2}) = {{30} \over {100}}$$

Probability that the scooter is of standard quality given that it was manufactured by Plant $1$ is
$$P(A/{E_1}) = {{80} \over {100}}$$

Probability that the scooter is of standard quality given that it was manufactured by Plant $2$ is
$$P(A/{E_2}) = {{90} \over {100}}$$

The probability of a scooter being manufactured by plant $2$ given that it is of good quality is
$$\begin{equation} \begin{aligned} P({E_2}/A) = {{P({E_2})P(A/{E_2})} \over {P({E_1})P(A/{E_1}) + P({E_2})P(A/{E_2})}} \\ P({E_2}/A) = {{0.3 \times 0.9} \over {0.7 \times 0.8 + 0.3 \times 0.9}} \\ P({E_2}/A) = {{0.27} \over {0.56 + 0.27}} \\ P({E_2}/A) = {{0.27} \over {0.83}} \\ P({E_2}/A) = 0.325 \\\end{aligned} \end{equation} $$


Question 29. An insurance company insured $2000$ scooter drivers, $4000$ car drivers and $6000$ truck drivers. The probability of an accident involving a scooter driver, car driver and a truck driver are $0.01$, $0.03$ and $0.15$ respectively. One of the insured person meets with an accident. What is the probability that he is a scooter driver?

Solution: Let the events be,
${E_1}$ = Person insured is a scooter driver.
${E_2}$ = Person insured is a car driver.
${E_3}$ = Person insured is a truck driver.
$A$ = Person meets with an accident.
In total, the people who have been insured is,
$$2000 + 4000 + 6000 = 12000$$
Probability that a person is a scooter driver is,
$$P({E_1}) = {{2000} \over {12000}} = {1 \over 6}$$
Probability that a person is a car driver is,
$$P({E_2}) = {{4000} \over {12000}} = {1 \over 3}$$
Probability that a person is a truck driver is,
$$P({E_3}) = {{6000} \over {12000}} = {1 \over 2}$$

Probability that a person meets with an accident given that he is a scooter driver is, $$P(A/{E_1}) = 0.01$$
Probability that a person meets with an accident given that he is a car driver is, $$P(A/{E_2}) = 0.03$$
Probability that a person meets with an accident given that he is a truck driver is, $$P(A/{E_3}) = 0.15$$

We need to know what is the probability that a scooter driver meets with an accident.
That is, what is the probability of a person being a scooter driver, given that he met with an accident.
$$\begin{equation} \begin{aligned} P({E_1}/A) = {{P({E_1})P(A/{E_1})} \over {P({E_1})P(A/{E_1}) + P({E_2})P(A/{E_2}) + P({E_3})P(A/{E_3})}} \\ P({E_1}/A) = {{{1 \over 6} \times 0.01} \over {{1 \over 6} \times 0.01 + {1 \over 3} \times 0.03 + {1 \over 2} \times 0.15}} \\ P({E_1}/A) = {1 \over {1 + 6 + 45}} \\ P({E_1}/A) = {1 \over {52}} \\\end{aligned} \end{equation} $$



Question 30. A doctor is to visit a patient. From the past experience, it is known that the probabilities that the he will come by train, bus, scooter or car are ${3 \over {10}}$ , ${1 \over 5}$ , ${1 \over {10}}$ and ${2 \over 5}$ respectively. the probability that he will be late are ${1 \over 4}$, ${1 \over 3}$ , ${1 \over {12}}$ , if he comes by train, bus and scooter respectively. he is never late by car. When he arrives he is late, what is the probability that he traveled by train?

Solution: Let the events be,
${E_1}$ - The doctor travels by train
${E_2}$ - The doctor travels by bus
${E_3}$ - The doctor travels by scooter
${E_4}$ - The doctor travels by car
$A$ - The event that the doctor is late.

Given,
Probability that the doctor travels by train, $$P({E_1}) = {3 \over {10}}$$
Probability that the doctor travels by bus, $$P({E_2}) = {1 \over 5}$$
Probability that the doctor travels by scooter, $$P({E_3}) = {1 \over {10}}$$
Probability that the doctor travels by car, $$P({E_4}) = {2 \over 5}$$

Probability that the doctor arrives late, given that he traveled by train is $$P(A/{E_1}) = {1 \over 4}$$
Probability that the doctor arrives late, given that he traveled by bus is $$P(A/{E_2}) = {1 \over 3}$$
Probability that the doctor arrives late, given that he traveled by scooter is $$P(A/{E_3}) = {1 \over {12}}$$
Probability that the doctor arrives late, given that he traveled by car is $$P\left( {A/{E_4}} \right) = 0$$

Now, the doctor arrives late. The patient likes to know the probability that he could have used train to commute.
Using Baye's
Probability that the doctor traveled by train, given that he was late is
$$\begin{equation} \begin{aligned} P({E_1}/A) = {{P(A/{E_1})P({E_1})} \over {P(A/{E_1})P({E_1}) + P(A/{E_2})P({E_2}) + P(A/{E_3})P({E_3}) + P(A/{E_4})P({E_4})}} \\ = {{{3 \over {10}} \times {1 \over 4}} \over {{3 \over {10}} \times {1 \over 4} + {1 \over 5} \times {1 \over 3} + {1 \over {10}} \times {1 \over {12}} + {2 \over 5} \times 0}} \\ = {3 \over {40}} \times {{120} \over {18}} \\ = {1 \over 2} \\\end{aligned} \end{equation} $$
Hence, there is probability of $0.5$ that he traveled by train, if given that he was late.



Question 31. Let ${d_1}$, ${d_2}$ and ${d_3}$ be three mutually exclusive diseases. Let $S$ be the set of observable symptoms of these diseases. Suppose a random sample of $10,000$ patients contains $3200$ patients with disease ${d_1}$, $3500$ with disease ${d_2}$ and $3300$ with disease ${d_3}$. Also, $3100$ patients with disease ${d_1}$, $3300$ patients with disease ${d_2}$ and $3000$ patients with disease ${d_3}$ show the symptom $S$. Knowing the patient has symptom $S$, the doctor wishes to determine the illness. On the basis of the information, what should the doctor conclude?

Solution: Let the events be,
${E_1}$ = The patient suffering from disease ${d_1}$
${E_2}$ = The patient suffering from disease ${d_2}$
${E_3}$ = The patient suffering from disease ${d_3}$
$A$ = The patient has the symptoms $S$.

Probability that a patient chosen at random suffers from disease ${d_1}$ is
$$P({E_1}) = {{3200} \over {10000}} = {{32} \over {100}}$$
Probability that a patient chosen at random suffers from disease ${d_2}$ is
$$P({E_2}) = {{3500} \over {10000}} = {{35} \over {100}}$$
Probability that a patient chosen at random suffers from disease ${d_3}$ is
$$P({E_3}) = {{3300} \over {10000}} = {{33} \over {100}}$$

Probability that a patient suffers from disease ${d_1}$ and has symptoms $S$
$$P(A \cap {E_1}) = {{3100} \over {10000}} = {{31} \over {100}}$$
Probability that a patient suffers from disease ${d_2}$ and has symptoms $S$
$$P(A \cap {E_2}) = {{3300} \over {10000}} = {{33} \over {100}}$$
Probability that a patient suffers from disease ${d_3}$ and has symptoms $S$
$$P(A \cap {E_3}) = {{3000} \over {10000}} = {{30} \over {100}}$$

Probability that a patient chosen at random has symptoms $S$, given that the patient is diseased by ${d_1}$
$$P(A/{E_1}) = {{31/100} \over {32/100}} = {{31} \over {32}}$$
Probability that a patient chosen at random has symptoms $S$, given that the patient is diseased by ${d_2}$
$$P(A/{E_2}) = {{33/100} \over {35/100}} = {{33} \over {35}}$$
Probability that a patient chosen at random has symptoms $S$, given that the patient is diseased by ${d_3}$
$$P(A/{E_3}) = {{30/100} \over {33/100}} = {{30} \over {33}}$$

Now, the doctor analyses, which disease do these symptoms mostly mean.
Probability that a person chosen at random has disease ${d_1}$ given that he shows symptoms $S$ is,
$$\begin{equation} \begin{aligned} P({E_1}/A) = {{P(A/{E_1})P({E_1})} \over {P(A/{E_1})P({E_1}) + P(A/{E_2})P({E_2}) + P(A/{E_3})P({E_3})}} \\ P({E_1}/A) = {{{{32} \over {100}} \times {{31} \over {32}}} \over {{{32} \over {100}} \times {{31} \over {32}} + {{35} \over {100}} \times {{33} \over {35}} + {{33} \over {100}} \times {{30} \over {33}}}} \\ P({E_1}/A) = {{31} \over {94}} \\\end{aligned} \end{equation} $$

Probability that a person chosen at random has disease ${d_2}$ given that he shows symptoms $S$ is,
$$\begin{equation} \begin{aligned} P({E_2}/A) = {{P(A/{E_2})P({E_2})} \over {P(A/{E_1})P({E_1}) + P(A/{E_2})P({E_2}) + P(A/{E_3})P({E_3})}} \\ P({E_2}/A) = {{{{35} \over {100}} \times {{33} \over {35}}} \over {{{32} \over {100}} \times {{31} \over {32}} + {{35} \over {100}} \times {{33} \over {35}} + {{33} \over {100}} \times {{30} \over {33}}}} \\ P({E_2}/A) = {{33} \over {94}} \\\end{aligned} \end{equation} $$

Probability that a person chosen at random has disease ${d_3}$ given that he shows symptoms $S$ is,
$$\begin{equation} \begin{aligned} P({E_3}/A) = {{P(A/{E_3})P({E_3})} \over {P(A/{E_1})P({E_1}) + P(A/{E_2})P({E_2}) + P(A/{E_3})P({E_3})}} \\ P({E_3}/A) = {{{{33} \over {100}} \times {{30} \over {33}}} \over {{{32} \over {100}} \times {{31} \over {32}} + {{35} \over {100}} \times {{33} \over {35}} + {{33} \over {100}} \times {{30} \over {33}}}} \\ P({E_3}/A) = {{30} \over {94}} \\\end{aligned} \end{equation} $$

$$P({E_3}/A) < P({E_1}/A) < P({E_2}/A)$$
This means $P({E_2}/A)$ is the largest.

Hence, the doctor concludes that a patient having symptoms $S$ is more likely to have disease ${d_2}$.
Improve your JEE MAINS score
10 Mock Test
Increase JEE score
by 20 marks
Detailed Explanation results in better understanding
Exclusively for
JEE MAINS and ADVANCED
9 out of 10 got
selected in JEE MAINS
Lets start preparing
DIFFICULTY IN UNDERSTANDING CONCEPTS?
TAKE HELP FROM THINKMERIT DETAILED EXPLANATION..!!!
9 OUT OF 10 STUDENTS UNDERSTOOD