On this page
Before you read on, make a guess. A family has two children, and you are told that at least one of them is a girl. What is the chance that both are girls? Many people say 1/2, because the other child looks like a fresh coin toss. Below you will see why the answer is 1/3, then test it by simulating families.
What is the two child problem?
The puzzle goes back at least to Martin Gardner's "Mathematical Games" column in Scientific American in May 1959, as the Wikipedia article on the boy or girl paradox records. He asked two similar-sounding questions. In the first, Mr Jones has two children and the older one is a girl: what is the chance both are girls? In the second, Mr Smith has two children and at least one is a boy: what is the chance both are boys? Gardner initially gave 1/2 for the first and 1/3 for the second, and later admitted that the second question was ambiguous.
We use girls here; the maths is identical. The puzzle assumes each child is equally likely to be a boy or a girl, independently of the other.
Why is the answer 1/3 and not 1/2?
List every family, writing the older child first:
BB: older boy, younger boy
BG: older boy, younger girl
GB: older girl, younger boy
GG: older girl, younger girl
Each of these four families has probability 1/4. Being told "at least one is a girl" rules out only BB. Three equally likely families are left, BG, GB and GG, and only one of them has two girls. So the answer is 1/3.
The formula says the same thing. The conditional probability of A given B is P(A ∩ B) / P(B), as defined in Siegrist's probability text on LibreTexts/02%3A_Probability_Spaces/2.04%3A_Conditional_Probability). Here A is "both girls" and B is "at least one girl", so P(A | B) = (1/4) / (3/4) = 1/3.
How do you simulate the two child problem?
The same LibreTexts chapter explains that, over many runs, the conditional probability of A given B should be close to the relative frequency of A among the runs where B happened. So: make lots of families, keep only those with a girl, and count.
Make 300 families. With a coin, toss twice per family: heads is G, tails is B. In Google Sheets or Excel, put =IF(RAND()<0.5,"G","B") in two columns and fill down 300 rows.
Cross out every BB family.
Count the families left, then count the GG families among them.
Divide GG by the families left.
Here is what to expect. Each type should come up in about a quarter of the 300 families, roughly 75 each. Crossing out BB leaves about 225, of which about 75 are GG, which gives 75 / 225 = 1/3. Your ratio will wobble around this with only 300 families. Recalculate a few times, or fill down 3,000 rows, and watch it settle near 0.333.
If you would rather watch it happen than build a spreadsheet, the Fermi Simulation Lab has interactive simulations for ideas that are easier to see than to read.
When is the answer 1/2 instead?
The answer depends on how you learned about the girl. The Wikipedia article notes that choosing a family at random from those with at least one girl and picking one child at random give different answers. Two versions give 1/2:
The older child is a girl. Only GB and GG survive, and one of the two is GG, so the answer is 1/2. This is Gardner's Mr Jones question.
You meet one child at random and she is a girl. Run this in your sheet: for each family, toss a third coin to pick a child, and keep the family only if that child is a girl. GG families always pass. BG and GB families pass half the time. Out of 300 families, expect about 75 GG and about 75 mixed families to pass, which makes the answer 1/2.
The lesson for exams is to read the clue as a filter and ask which families it lets through.
How do you check your answer on similar questions?
Use this four-step check on any "given that" question:
Write the full sample space, with the order made explicit (older and younger, first and second die).
Translate the clue into a filter: which outcomes does it keep?
Ask how the information was obtained: did someone check both children, or pick one?
Count the outcomes you want among the outcomes kept, then sanity-check with a quick simulation.
To practise the same reasoning, read why at least one boy gives a 1/3 chance of two boys, work through conditional probability with two dice, given the sum is even, and then simulate 300 Monty Hall games to see why switching wins. If a textbook question still trips you up, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



