Suppose that 15 percent of the families in a certain community have no children, 20 percent have 1, 35 percent have 2, and 30 percent have 3 children; suppose further that each child is equally likely (and independently) to be a boy or a girl. If a family is chosen at random from this community, then B, the number of boys, and G, the number of girls, determine the conditional probability mass function of the size of a randomly chosen family containing 2 girls.
My attempt
There are exactly three ways this can happen:
1) family has exactly 2 girls
2) family has 2 girls and 1 boy
3) family has all 3 girls
The first one is pretty simple. Given that you are going to "select" exactly two children, find the probability that they are BOTH girls (it's a coin flip, so p = 50% = 0.5):
$0.5^2 = 0.25$
So the probability that the family has exactly 2 girls is the probability that the family has exactly two children times the probability that those two children will be girls:
$\frac{1}{4} \cdot 35\% = 8.75\%$
Now find the probability that, given the family has exactly 3 children, that exacly two are girls. Now you flip 3 times but only need to "win" twice-this is a binomial experiment.
There are 3 choose 2 = 3 ways to have exactly two girls: 1st, 2nd, or 3rd is a boy... interestingly the probability of having any particular permutation is just $0.5^3 = 1/8$ (because it's still $0.5 \times 0.5$ for two girls, then $0.5$ for one boy).
So the chance of exactly 2 girls is: $\frac{3}{8}$
Now find the probability for having exactly 3 girls... that's easy, there's only one way, you just have all 3 girls, probability is just $\frac{1}{8}$. Now, add these up
$\frac{3}{8} + \frac{1}{8} = \frac{4}{8} = \frac{1}{2}$
So now use the percent of families with exactly 3 children to find this portion of the probability:
$\frac{1}{2} \cdot 30\% = 15\%$
Hence, add the two probabilities... here is it in full detail
$\begin{eqnarray}\mathbb{P}(\text{contains 2 girls}) &=& \mathbb{P}(\text{2 children}) \times \mathbb{P}(\text{2 girls, 2 children}) + \\ &\phantom{+=}& \mathbb{P}(\text{3 children}) \times \mathbb{P}(\text{2 or 3 girls, 3 children}) \end{eqnarray}$
$\frac{1}{4} 35\% + 30\% \times \left(\frac{3}{8} +\frac{ 1}{8}\right)$
$8.75\% + 15\% = 23.75\%$
Is my attempt correct?