Bayes's rule and probability theory

211 Views Asked by At

I'm trying to solve such a task:

Preliminary tests of students showed that 30% of them are very well prepared to the exam, 50% are prepared quite well and 20% are prepared somehow. For the first group of students probability of getting the highest grade is 90%, for the second group of students it's 70% and for the last one — only 30%. A random student got the highest grade. What's the probability that he was very well prepared?

This is how I see the task:

G1 - 30%, G2 - 50%, G3 - 20% (groups prepared very well, quite well and somehow)

H - event to get highest grade

P(H|G1) - 90%, P(H|G2) - 70%, P(H|G3) - 30%

I should find P(G1|H) - ?

P(G1|H) = P(H|G1)xP(G1) / P(H)

P(H) = (0.3 x 0.9)+(0.5 x 0.7)+(0.2 x 0.3) = 0.68

P(G1) = 1/3 (probability to chose one of 3 groups)

P(G1|H) = 0.9*0.33 / 0.68 = 0.44

My answer is not correct. What is wrong with my assumptions/calculations?

2

There are 2 best solutions below

2
On

Your problem is how you determine $P(G_1)$. Indeed $P(G_1)=0.3$, the percentage of the students being very well prepared. Thus the answer should be \begin{align} P(G_1 \,|\, H) = \frac{P(H \,|\, G_1)P(G_1)}{P(H)} = \frac{0.9\cdot 0.3}{0.68} \simeq 0.397 \: . \end{align}

1
On

I get the same answer as that given by SomeCallMeTim.

There are $3$ possible (disjoint) combinations of events that will lead to someone getting the highest grade:

  • Very well prepared : probability = $(.3 \times .9)$.
  • Quite well prepared : probability = $(.5 \times .7)$.
  • Somehow prepared : probability = $(.2 \times .3)$.

So, in accordance with Bayes Theorem, the probability that the 1st event (student was very well prepared) occurred, rather than either of the other $2$ events is

$$\frac{0.27}{0.27 + 0.35 + 0.06} = \frac{27}{68} \approx 39.7\%.$$