# question on probability using bayes theorem

Here goes the question:

In a certain day care class, 30% of the children have grey eyes, 50% of them have blue and the other 20%'s eyes are in other colors. One day they play a game together. In the first run, 65% of the grey eye ones, 82% of the blue eyed ones and 50% of the children with other eye color were selected. Now, If a child is selected randomly from the class, and we know that he/she was not in the first game, what is the probability that the child has blue eyes?

My solution

lets say B = blue, G = grey and O = "Other color" and NR = "not selected for the first run"

$$P(B/NR) = \frac{P(NR/B)P(B)}{P(G)P(NR/G) + P(B)P(NR/B) + P(O)P(NR/O)}$$

on substituting values $$P(B/NR) = \frac{0.5 * (1-0.82)}{(0.3*(1-0.65)) + (0.5*(1-0.82)) + (0.2*(1-0.5))}$$

$$P(B/NR) = 0.305$$

Is this the right way to use bayes theorem?

-

Yes, this is correct.

The general form of Bayes' rule is

$$P(A_i|B)= \frac{P(B|A_i)P(A_i)}{\sum_jP(B|A_j)P(A_j)}$$

as you've used above.

-
Thanks for the generalized version of Bayes' theorem. Do you see anything wrong with the way I have arrived at the individual probabilities? –  naresh Nov 16 '12 at 17:12
Nothing wrong that I can see... –  Simon Hayward Nov 16 '12 at 18:49
Has that helped, do you have the answer now? –  Simon Hayward Nov 16 '12 at 19:23