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?
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}