A mother has two children. What is the probability, given this information that both are girls? The Problem
You know that your new neighbors have two children. One day you
see the mother taking a walk with a girl. What is the probability that the other child is also a girl?
a) Given that the mother chooses the younger child with probability $p$.
b) Given that if the children are of different genders, the mother chooses the girl with probability $p$.
My solution
First of all assume that the mother walks only with her children.
Lets mark the observed girl and order them by age, then sample space is
$S=\{b^*b,bb^*,b^*g,bg^*,g^*b,gb^*,g^*g,gg^*\}$. We are interested of the case in which both are girls $GG=\{g^*g,gg^*\}$
a) Let $Y=\{\text{The mother chooses to walk with the younger child}\}$,
then we have
$$
P(GG)=P(GG|Y)P(Y)+P(GG|Y^c)P(Y^c)=\\
=\frac{p/4}{p}p+\frac{(1-p)/4}{1-p}(1-p)=1/2
$$
(Using Law of Total Probability and def. of conditional prob.)
b) My attempt is to let $G^*=\{\text{The mother chooses to walk with a girl}\}$, $B^*=\{\text{The mother chooses to walk with a boy}\}$ and $D=\{\text{children has different gender}\}$, then we have
$$
P(G^*|D)=p,
$$
$$
P(B^*|D)=1-p.
$$
But i guess I'm interested in $GG=G^*\cap D^c$.
 A: In $b$, you are interested in $P(D^c | G^*)$, not in $P(D^c \cap G^*)$ - we already know that $G^*$ happened. It's standard applying of Bayes rule: $P(D^c | G^*) = \frac{P(G^* | D^c) \cdot P(D^c)}{P(G^*)}$.
For numerator, $P(G^* | D^c) = \frac{1}{2}$ (if children have the same gender, then $G^*$ is equal to both of them been girls) and $P(D^c) = \frac{1}{2}$, thus numerator is $\frac{1}{4}$.
For denominator lets use law of total probability (with events $gg$, $gb$ and $bb$ denoting two girls, boy and girl and two boys): $P(G^*) = P(G^* | gg) \cdot P(gg) + P(G^* | gb) \cdot P(gb) + P(G^* | bb) \cdot P(bb) = 1 \cdot \frac{1}{4} + p \cdot \frac{1}{2} + 0 \cdot \frac{1}{4} = \frac{1 + 2p}{4}$.
So the final answer is $\frac{1}{1 + 2p}$. For sanity check, we can check that if $p = 0$ this probability is $1$ (only mothers with two girls will walk with a girl), and if $p = 1$ then probability if $\frac{1}{3}$ (all mothers with at least one girl will walk with a girl, and among them $\frac{1}{3}$ has two girls).
