# Problem based on law of total probability and bayes theorem

I was solving problems based on Bayes theorem from the book "A First Course in Probability by Sheldon Ross". The problem reads as follows:

### The problem

A new couple, known to have two children, has just moved into town. Suppose that the mother is encountered walking with one of her children. If this child is a girl, what is the probability that both children are girls?

### My solution

I thought that there are three possibilities that the child with the mother is a girl:

• Its the only child in (GB) pair
• Its the first child in (GG) pair
• Its the second child in (GG) pair.

Out of these three possibilities, only last two cases will result other child being also the girl. Hence I felt the probability should be $\frac{2}{3}$. In fact there is a similar question preceding this one in the book, which takes the same approach as above. However for this particular problem, the book has following to say:

### Given book solution

Let

• $G_1:$ the first (that is the oldest) child is a girl
• $G_2:$ the second child is a girl
• $G:$ the child seen with the mother is girl Same with $B_1, B_2$ and $B$. Then,

\begin{align} P(G_1G_2|G) & =\frac{P(G_1G_2G)}{P(G)} \\ & =\frac{P(G_1G_2)}{P(G)} \\ & =\frac{P(G_1G_2)} { \begin{matrix} P(G|G_1G_2)P(G_1G_2)+P(G|G_1B_2)P(G_1B_2)+\\ P(G|B_1G_2)P(B_1G_2)+P(G|B_1B_2)P(B_1B_2)\\ \end{matrix} }\\ & =\frac{P(G_1G_2)} { \begin{matrix} P(G_1G_2)+P(G|G_1B_2)P(G_1B_2)+\\ P(G|B_1G_2)P(B_1G_2)\\ \end{matrix} } \text{ (since P(G|G_1G_2)=1 and P(G|B_1B_2)=0)}\\ & =\frac{\frac{1}{4}}{\frac{1}{4}+P(G|G_1B_2)/4+P(G|B_1G_2)/4}\\ & =\frac{1}{1+P(G|G_1B_2)+P(G|B_1G_2)} \end{align} Thus, the answer depends on whatever assumptions we want to make about the conditional probabilities that the child seen with the mother is a girl given the event $G_1B_2$ and that the child seen with the mother is a girl given the event $G_2B_1$. The solution further goes on a bit concluding that the problem is incapable of solution.

### My doubts

1. Where in my solution I went wrong?
2. Why do we have to consider ages of the children?

Above I said "there is a similar question preceding this one in the book, which takes the same approach as above". I believe this particular question is the source of my confusion. So let me put that question here, so that we can do comparison of solutions. That problem is as follows:

Suppose that we have 3 cards that are identical in form, except that both sides of the first card are colored red, both sides of the second card are colored black, and one side of the third card is colored red and the other side black. The 3 cards are mixed up in a hat, and 1 card is randomly selected and put down on the ground. If the upper side of the chosen card is colored red, what is the probability that the other side is colored black?

The author first finds $1/3$ is the answer with the help of the Bayes formula. Then he comments following:

The comment: Some students guess 1/2 as the answer by incorrectly reasoning that, given that a red side appears, there are two equally likely possibilities: that the card is the all-red card or the red–black card. Their mistake, however, is in assuming that these two possibilities are equally likely. For, if we think of each card as consisting of two distinct sides, then we see that there are 6 equally likely outcomes of the experiment—namely, R1,R2,B1,B2,R3,B3—where the outcome is R1 if the first side of the all-red card is turned face up, R2 if the second side of the all-red card is turned face up, R3 if the red side of the red–black card is turned face up, and so on. Since the other side of the upturned red side will be black only if the outcome is R3, we see that the desired probability is the conditional probability of R3 given that either R1 or R2 or R3 occurred, which obviously equals $1/3$.

I interpreted the comment as follows:

There are three chances that the upper side of the chosen card is red:

• 1st side of RR
• 2nd side of the RR
• Only red side of BR

Out of these three, only in case of BR, we can have other side black. Thus, the probability is $1/3$.

Now that you can see I have applied similar approach to the original question in my solution, I have three renewed doubts:

• Did I interpreted comment on red-black-cards problem incorrectly and hence applied wrong approach to the original question?
• If my interpretation of comment is correct, but the approach is not applicable to the original question then why is so?
• Now I see the Bayes formula based solution to red-black-card problem has considered this: $$P(R)=P(R|RR)P(RR)+P(R|RB)P(RB)+P(R|BB)P(BB)$$ Surprisingly it has missed $P(R|BR)P(BR)$!!! Is it because both these $P(R|RB)P(RB)$ and $P(R|RB)P(RB)$ are associated with the same event corresponding to the selection of single card with one side red and other black? And this is not the case with boy-girl problem as $GB$ and $BG$ are different events, as author notes based on ages? Is this that subtle difference between two problems?
• With regard to the ages of the children, I think Ross simply wants to be unambiguous about which child is which when he refers to them, so he says #1 is the older of the two. – awkward Jul 29 '17 at 13:29

1. Where in my solution I went wrong?

You considered the family makeup to an unbiased selection from three outcomes, $\{BB, BG, GG\}$.   Think back to discussions on the outcomes of tossing two coins; one of these outcomes should be twice as likely as the others.

1. Why do we have to consider ages of the children?

Birth-order is just a convenient way to label the family structure, where $\{BB, BG, GB, GG\}$ are equally probable (assuming unbiased and independent choice of sex at each birth).

Then applying your logic, the answer to the question "What is the probability that both children are girls given that this one is a girl?" is $1/2$.

This can be modelled along the following lines:   Paint the faces of four fair coins blue and green, so you have the set $\{B_HB_T, B_HG_T, G_HB_T, G_HG_T\}$.   We select one coin at random and toss a green side; what is the probability that the other side of that coin is also green?   Well, we could be looking at any of the four green sides, two of which have the other side painted green.   Hence the answer.

(What if the coins aren't fair?)

The answer to the question: "What is the probability that both children are girls given that at least one is a girl?" can be modelled by taking the above set of four coins, selecting one at random and reporting that at least one of its sides is green.   This could have been any one of three coins, only one of which has two green sides.   The answer is thus $1/3$.

• At the end of the original question, I have added "that" another question whose solution is possibly source of my confusion. Please help me compare these two questions and their solutions, so that the stuff will be very clear to me. – anir Jul 29 '17 at 15:23
• @anir The question being asked there is similar to "What is the probability that both children are girls when given that at least one is a girl?" – Graham Kemp Jul 29 '17 at 23:17
• I feel, with "at least one girl" modification the problem does not become similar to the red-black-card problem. In both red-black-card problem and original boy-girl problem, we pick specific instance of a girl or red-colored side, thus counting 2 for RR or GG. That is not the case with "at least one girl" modification, since we count for 1 for GG. Right? Solution of "at least one girl" modification being 1/3 seems to be coincident. Right? – anir Jul 30 '17 at 15:32

Suppose that e.g. the encountered girl is a baby.

Then the chances that we are dealing with a second child in a (GG) pair are almost $0$, so your route to $\frac23$ becomes one to $\approx\frac12$.

This is caught in the solution of the book: $P(G|G_1B_2)\approx1$ and $P(G|B_1G_2)\approx0$ resulting in $P(G_1G_2\mid G)\approx0.5$.

• At the end of the original question, I have added "that" another question whose solution is possibly source of my confusion. Please help me compare these two questions and their solutions, so that the stuff will be very clear to me. – anir Jul 29 '17 at 15:23

Case 1. A child walking with her mom is a girl

Without any specific information, besides the family having 2 children, and assuming equal chances for girls and boys, the sample space for the family would be $$\Omega=\{BB,BG,GB,GG\}$$ with equal probabilities = 1/4 for each. Therefore the probability for 2 girls without any other information would be $P(\{GG\})=1/4$.

Then, an information is given... the child with her mom is a girl. Call this event $X$. Under the same sample space, I can see just one way to define this event as the subset from $\Omega$ defined by $$X=\{BG,GB, GG\}.$$ I can't see other way to interpret this conditioning information. The event $\{BB\}$ was excluded, but not the other elementary events constructed from $\Omega$. I cannot infer the order of the girl seen with the mother from the information given.

Now just what you want:

$$P(\{GG\}|X)=\frac{P(\{GG\}\cap X)}{P(X)}=\frac{P(\{GG\}\cap \{BG,GB, GG\})}{P(\{BG,GB, GG\})}$$ $$P(\{GG\}|X)=\frac{P(\{GG\})}{P(\{BG,GB,GG\})}=\frac{1/4}{3/4}=\frac{1}{3}$$

Answer for the original problem: 1/3.

Case 2. The second child was walking with here mom and is a girl

If, on the other hand, the information was *the second child, a girl, was walking with her mom". This event is then defined by: $$Y=\{BG,GG\}.$$ Therefore $$P(\{GG\}|X)=\frac{P(\{GG\}\cap Y)}{P(Y)}=\frac{P(\{GG\})}{P(\{BG,GG\})}=\frac{1/4}{2/4}=\frac{1}{2}$$