Finding posterior distribution

151 Views Asked by At

Im stuck with the following question.

When determining the sex of a baby guinea pig there is a one in three chance of you making mistake if the baby is female and one in six of you making a mistake if it the baby is male.

You have $3$ baby guinea pigs. A priori,each has a $50$% chance of being male and $50$% of being female independently of others.

You randomly choose $2$ of the babies and determine that they are both male. Find the posterior distribution and mean of the actual number of males among the three baby guinea pigs.

This is what i've done but have no idea if it's good or not. Can someone check it please.

My answer: P(mistake|female)=$1/3$

P(no mistake|female)=$2/3$

P(mistake|male)=$1/6 $

P(no mistake|male)=$5/6$

P(male)=$1/2$

P(female)=$1/2$

Let (x|no mistake) -> actual number of males

(x|no mistake) ~ Binomial ($3, 1/2$)

P(no mistake|X) is proportional to P(x|no mistake)*P(no mistake)

P(no mistake)

= P(no mistake|male)*P(male) +P(no mistake|female)P(female)

=($5/6)(1/2) + (2/3)(1/2) = 3/4$

P(no mistake|x) is proportional to ($3cx)(0.5^x ) *(0.5^(3-x))* (3/4)$

Am i going in the right direction with this?

Edit: So this is what i've done now

I've redefined everything

P(guess male|Actual Female) = $1/3$

P(guess female|Actual Female) = $2/3$

P(guess male|Actual Male) = $5/6$

P(guess female|Actual Male) = $1/6$

P(Actual Male) = P( Actual Female) = $1/2$

For $1$ guinea pig,

P(guess male)

= P(guess male|Actual Male)*P(Actual Male) + P(guess male|Actual Female)*P(Actual Female)

=$(5/6)(1/2) +(1/3)(1/2)$

=$7/12$

P(Actual Male|guess male)

= (P(guess male|Actual Male)*P(Actual male))/P(guess male)

= ($5/6)(1/2)/(7/12$)

=$5/7$

But this is for $1$ guinea pig.

so i've then defined $X$ as no. of Actual Male|guess male

$X\sim $Bin($3,5/7$)

Is this the correct way of proceeding?