I'm trying to resolv this problem but I think i'm not getting the correct answer. The anwser says that there is 50% probability that the baby is right handed if the test accuracy is 90%, and 69% probability the baby is right handed if the accuracy of the test is 80%.
The problem is : A doctor says that an infant who predominantly turns her head to the right while lying on her back will be right-handed and one who predominantly turns her head to the left will be left-handed. Given that 90% of the population is right-handed, what is my daughter Clara's probability of being right-handed, given that she predominantly turns her head to the left assuming that the test is 90% accurate? What if the test is 80% accurate?
What I have done is the normalisation using this formula : P(M|s) = P(s|m)P(m) / (P(s|m)P(m) + P(s|not m)P(not m))
And my variables are :
P(right-handed) = 0.9
P(not right-handed) = 0.1
P(test | right-handed) = 0.9
P(not test | not right-handed) = 0.9
My equation is :
P(not right-handed | test) = P(test | not right-handed) * P(not right-handed) / P(test | not right-handed) * P(not right-handed) + P(test | right-handed) * P(right-handed)
What I am doing wrong?
Simple problems like this are sometimes easier to work out in tabular form. If the test is $80$% accurate, you have the following distribution of percentages:
$$\begin{array}{r|cc|c} &\text{accurate}&\text{not accurate}&\text{total}\\ \hline \text{right-handed}&72&\color{brown}{18}&90\\\ \text{left-handed}&\color{brown}8&2&10\\ \hline \text{total}&80&20&100 \end{array}$$
The two brown figures represent the percentage of the population that as infants predominantly turn their heads to the left: they’re the right-handers for whom the test is not accurate and the left-handers for whom it is accurate. Within this group right-handers are $$\frac{18}{18+8}=\frac{18}{26}\approx0.6923$$ of the total, or about $69$%.
You can also use this table and calculation to check your own, by identifying the component probabilities in yours with entries in the table.