12

A king has n children, at least one of them is a daughter. What’s the probability that all of them are daughters?

So far I've considered the case of 3 children, which gives a probability of 1/7. But I'm confused about how to generalise this?

claud124
  • 135
  • 6
    Hello and welcome to math.stackexchange. How did you get to the answer 1/7? Maybe this approach can be extended. – Hans Engler Oct 16 '15 at 12:40
  • 1
  • 15
    All these questions ignore the "king" aspect of the question. In general, a king with 3 daughters is much more likely to have a fourth child than a king with 3 children and one or more sons. However, there is no formula for the odds of a king giving up after $n$ daughters and no sons. – user3294068 Oct 16 '15 at 19:34
  • 7
    It depends how you selected the king (which is to say, it depends how you determined that at least one of the children is a daughter): https://en.wikipedia.org/wiki/Boy_or_Girl_paradox – Steve Jessop Oct 16 '15 at 22:31
  • 1
    @user3294068 ... at least, that might have been the case in many kingdoms a few hundred years ago (occasionally accomplished by executing the queen who failed to provide a male heir and replacing her with a new one). – Robert Israel Oct 16 '15 at 22:35
  • @CountIblis: In real life, yes. In the sense of uniform discrete probability spaces, no. – Cameron Buie Oct 17 '15 at 02:23
  • 1
    BTW What difference does it make that the father is a king and not, say, a farmer or a blacksmith or a hydraulic engineering consultant? – Jay Oct 17 '15 at 04:37
  • Is the probability that a child is a girl $\frac12$? – JRN Oct 24 '15 at 03:03

10 Answers10

19

The sample space has $2^n$ equi-probable points, assuming P(boy) = P(girl) = $\frac12$

Knowledge that there is at least one girl implies that one particular outcome is ruled out.

Continue....

15

Assuming that the probability of a child being a girl is 1/2, which is not quite true biologically but close ...

Every child is either a boy or a girl. (Old fashioned idea, but I'm sticking with it.) So with n children there are 2^n possibilities.

If "success" is defined as all girls, then that is exactly 1 of the possible combinations. So, ignoring the "at least one girl" requirement for the moment, the probability of all girls is 1 / 2^n. e.g. with 1 child, 1/2; with 2 children, 1/4; 3 children, 1/8; 4 children, 1/16; etc.

But we don't want to consider all possibilities, but only those where at least one child is a girl. So the denominator should not be 2^n, but only those where at least one of the children is a girl. This is an easy special case, though: just as there's only one way for all the children to be girls, there's only one way for none of the children to be girls: they must all be boys. So of the 2^n possible combinations, the number that include at least one girl is 2^n-1.

So the probability is 1 / (2^n-1). e.g. 2 children, 1/3; 3 children, 1/7; 4 children, 1/15; etc. Note that if there's only one child, this formula gives 1/1=100%, which makes sense: If you have only one child, and at least one of them is a girl, then that one child must be a girl and they are "all" girls.

** Update **

Okay, apparently an unclear point here.

If there are two children, that gives 2^2=4 possibilities: BB, BG, GB, and GG. Note that there is only one way each to have all boys or all girls, but 2 ways to have one boy and one girl. So, considering all cases, not just the ones where at least one child is a girl, the probability of all boys is 1/4, all girls is 1/4, and one of each is 2/4 = 1/2.

Similarly with 3 children the possibilities are BBB, BBG, BGB, BGG, GBB, GBG, GGB, GGG. The probability of all boys is 1/8, all girls is 1/8, 1 boy and 2 girls is 3/8, and 2 boys and 1 girl is 3/8. That is, there's more than one way to have two boys and a girl -- the girl could be first, second, or third -- but there's only one way to have all boys or all girls.

Jay
  • 469
  • 1
    Can you please explain how having 2 children, one of which /must/ be a girl, has a 1/3 chance of the other child being a girl, and not a 1/2 chance? I would think the probability would be more like 1/(2^(n-1)), as one of the n values is already determined and shouldn't be counted as part of the probability that the remaining children are also girls. – rStyskel Oct 16 '15 at 20:09
  • 1
    @rStyskel Suppose the king has two children A and B. There are four possibilities: 1) A is a girl, 2) B is a girl, 3) both A and B are girls, and 4) neither A nor B are girls. Option 4 is ruled out because there must be at least one girl. Out of the three remaining options, only one results in all girls. Thus, the odds of all girls for n=2 children is 1/3. – Rainbolt Oct 16 '15 at 20:12
  • But we're looking for combinations, not permutations. in the possibilities, you've listed only 3 different possibilities. One child is a girl, both children are girls, or no children are girls. Since we know that one child must be a girl, there are only two choices, thus the odds for all girls (in this situation) is 1/2. – rStyskel Oct 16 '15 at 20:17
  • @rStyskel Your first and second comments appear contradictory to me. In the first comment, there are 2^(n-1) outcomes. In the second comment, there are only n outcomes (1 girl, 2 girls, 3 girls, 4 girls, ... n girls). The difference between combinations and permutations is that order of choice does not matter for combinations. The choices themselves do still matter. Choosing A and choosing B are two distinct events, although the order they happen in doesn't matter. – Rainbolt Oct 16 '15 at 20:27
  • If it's a king, we are probably talking about a medieval hypothetical scenario, where only considering biological gender is completely okay and encouraged by society. – Kroltan Oct 16 '15 at 20:59
  • 2
    @rStyskel You're assuming that the events 'one child is a girl', and 'both children are girls' are equiprobable to get your 1/2 value. - That is, you're doing the equivalent of saying "A fair die either comes up as a six or as not-a-six. There are only two choices, thus the odds for of rolling a six on a fair die is 1/2". The 1/3 value comes from figuring 'one child as a girl' as twice as likely as 'both children are girls'. (That is - listing oldest child then youngest - assuming GB, BG & GG are equiprobable.) – R.M. Oct 16 '15 at 23:10
  • 2
    @rStyskel: The combinations are not equiprobable; one boy one girl is twice as likely as each of the other possible combinations. In general, $m$ boys $n$ girls has probability $\binom{m+n}{m} 2^{-(m+n)}$, and if we analyze the problem in terms of combinations, we have to account for the weights. Phrasing the problem in terms of permutations (or more accurately, as an ordered sequence of boy/girl choices) is easier, because those are equiprobable. –  Oct 16 '15 at 23:42
3

Let $X$ be the count of daughters among the $n$ offspring.   Assuming the probability that a child will be a daughter is $1/2$, then the count will have a binomial distribution: $X\sim\mathcal{Bin}(n, 1/2)$

$$\mathsf P(X=x\mid X\geq 1) = \dfrac{\mathsf P(X=x)}{1-\mathsf P(X=0)}\;\big[x\in\{1..n\}\big]$$

Where $\mathsf P(X=x)=\dbinom{n}{x}{\big(\tfrac 1 2\big)}^n\;\big[x\in\{0..n\}\big]$

So $\mathsf P(X=n\mid X\geq 1) $ $= \frac{{\big(\tfrac 1 2\big)}^n}{1-{\big(\tfrac 1 2\big)}^n} \\ = \frac{1}{2^n-1}$

Which as true blue anil has suggested can also be obtained by considering that of the $2^n$ possible outcomes, $1$ is the favoured event, and $1$ is the complement of the condition—"the event that can be ruled out".


Note: $\big[\text{conditional}\big]$ is the Iverson notation for an indicator function; having a value of $1$ when the conditional is true but $0$ otherwise.

Graham Kemp
  • 129,094
2

The appropiate formula would be 1 /(2^n - 1) assuming at least one child.

The top would be the available number of good outcomes which will always be 1. Because there is always only one way to have all children be girls.

The bottom would be the total number of outcomes which would be 2^n - 1. There are 2^n possible combinations of children; however, you will always be able to exclude one combination which is the combination of all boys.

1

It surely depends on how we know there will be a girl. If we don't know anything more than the fact that one of the children is a girl, then it's 1/(2^n)-1).

For two children we have a set of children containing a girl and the other child. Now ignoring the restriction we know that most parents that don't have B/B have G/B - 2/3rds to be precise. Therefore, having built that probability tree (equal chances of BB GB BG GG) if we apply the restriction all we would do is say "well that rules out BB". So we get 1/3rd chance of getting GG.

If the king kept having children until he had a daughter and then maybe had more then all we know about his children is that if he didn't have any girls in his first n-1 children then he has a girl for his last child. That doesn't help us in the all-girl situation at all, as building a probability tree of n=2 we get:

Boy/girl=50/50

Boy? Second child is a girl but it doesn't matter.

Girl? Continue

Boy/girl=50/50

Therefore it's unchanged, the probability is 1/4. The fact that there is no further branch after the first node doesn't affect what we know about the final probabilities, since our events are no longer independent, with a special case of n=1 in which case the probability is 1.

If instead we live in a region rife with kings, and we've decided to move to the land of one that has a daughter, then we just take the usual distribution and distribute that probability across the board - we wind up with a 1/3 chance of picking a a king with 2 daughters! That's 1/((2^n)-1), same as when we don't know anything more than that one child is a daughter.

One more case: If we know that a particular child is a girl, it is actually more information. Going back to the first case with BB BG GB GG we ruled out BB. If we know the first child is a girl, we can further rule out BG, so we're left with GB and GG - 50% chance of getting all-girls.

The key here is to recognize how much information you actually get and where it applies (something I failed to do with the first two cuts of my answer...)

Jeff
  • 121
  • Your point that the number of children could depend on the genders is a valid one, or we could do a meta-analysis about the possibility that what information was chosen to be given depends on the genders... but your initial analysis of the two child case is way off; it's pretty easy to count $P({B,G})=1/2$ and $P({G,G})=1/4$. You say "the events are independent"... but what events are you referring to? If we name the children $X$ and $Y$, then clearly $P(X=G)$ and $P(Y=G)$ are independent, but $P(X=G)$ is pretty clearly not independent of $P(X=G \vee Y=G)$ –  Oct 17 '15 at 18:17
  • @Hurkyl I was referring to P(X=G) and P(Y=G). If we have set S and take the prior information as the predicate X is a member of S and X=G, then we have Y is a member of S, Y !=G and P(Y=G) = 0.5 – Jeff Oct 17 '15 at 19:13
  • Yes, I agree with that. I just want to emphasize that the prior information given by the problem is $X=G \vee Y=G$, not $X=G$. (i.e. "at least one one is a girl", not "this specific one is a girl") –  Oct 17 '15 at 19:26
  • Yup i see now. I'll update wiith the correct answer in a sec. Thanks for helping me out :-) – Jeff Oct 17 '15 at 21:09
0

1/(2^(n-1))

It's the same as calculating the probability of a sequence of unanimous coin flips, except you've guaranteed one of the outcomes, hence the "n-1".

A few examples

He has 1 kid: 1/2^0 = 1. You guaranteed a girl

He has 2 kids: 1/2^1 = 0.5. One is a girl, the other has 1/2 chance to go either way.

He has 10 kids: 1/2^9 = 0.001953125. Same logic applies as the other 2 examples.

0

It should be uncontroversial that, for $n > 0$,

$$ P(\text{all girls} \mid \text{at least one girl, n children}, X) = \frac{P(\text{all girls} \mid \text{n children}, X)}{1 - P(\text{all boys} \mid \text{n children}, X)}$$

simply from the definition of conditional probability. Here $X$ is a placeholder for whatever extra hypotheses you want to impose on the problem, if any.


Given the OP's answers, the OP is presumably working with a model where

$$ P(\text{all girls} \mid \text{n children}, X) = 2^{-n} $$ $$ P(\text{all boys} \mid \text{n children}, X) = 2^{-n} $$

and consequently,

$$ P(\text{all girls} \mid \text{at least one girl, n children}, X) = \frac{1}{2^n - 1}$$

There are reasons to consider other models; e.g. the ratio of male to female births and the king's desire to have a male heir could affect these probabilities.

In fact, the very fact we are considering the question can influence how we should model the probabilities; e.g. if our smartaleck friend posed the problem and bet us a dollar that the children were all girls, I would expect him to have some inside knowledge rather than posing a 'fair' question.


Some of the answers try to avoid the counterfactual argument; i.e. they include the hypothesis "$\text{at least one girl}$" in the common hypothesis $X$. One important thing to note when trying to do the analysis this way is that the genders of the children are not identically distributed, independent random events when subjected to this condition.

There is a short proof by contradiction that this should be so; assume that they are independent and identically distributed. Then,

$$ 0 = P(\text{all boys} \mid \text{at least one girl, X}) = \prod_{c \text{ is a child}} P(c \text{ is a boy} \mid \text{at least one girl, X}) $$

and consequently we infer $P(c \text{ is a boy} \mid \text{at least one girl, X}) = 0$ for each child $c$.

Now, we can get independence if we drop the identically distributed condition; specifically if one of the children is singled out (call it $g$) and we are told that $g$ is a girl.

We don't have this in the given problem; it's presented in a way such that all of the king's children are equal. However, there are variations on the problem where one particular child is special. e.g. "The king introduces you to his daughter Samantha. What is the probability her siblings are all girls too?"


One could continue on to to break the symmetry by splitting the children up onto "one special child that is a girl" and "the other children"; a common mistake here is to mistake this approach with the "special child" version. Here, the special child is not given to us by the problem, but is introduced by our choice to break the symmetry, and that choice must be properly accounted for.

For notational simplicity, suppose that $X$ includes the hypotheses that there are $n$ children and that there is at least one girl. For any particular child $c$, it is interesting to ask for

$$ P(\text{c is a girl} \mid \text{c is an "other" child}, X) $$

and we can compute that this is equal to

$$ \frac{P(\text{c is an "other" child} \mid \text{c is a girl}, X) P(\text{c is a girl} \mid X)}{P(\text{c is an "other" child} | X)} $$

Depending on our modeling, we might expect

  • $P(\text{c is a girl} \mid X)$ is slightly greater than $1/2$ (because we've ruled out the all boy case)
  • $P(\text{c is an "other" child} \mid X) = \frac{n-1}{n}$
  • $P(\text{c is an "other" child} \mid \text{c is a girl}, X)$ should be a lot less than $\frac{n-1}{n}$

and consequently, the probability that any particular "other" child is a girl should be a lot less than $1/2$.

Incidentally, I believe the genders of two different "other" children shouldn't be independent variables either.

-1

Its generalisation can be P(n,1)+P(n,2)+....+P(n,n) where p represents permutation abd their addition is no of ways of having children. So probability is P(n,n)/total no of ways of having children which is the above sequence

-1

I agree with the answer getting the least traction here 1/(2^(n-1))

In the question there is a guarantee of 1 daughter regardless of n. You have to assume one of the children a daughter in the equation, figuring out which child is the daughter is meaningless.

No matter the number of outcomes you can just assume the first child is a daughter.

-1

I agree with both user3263864 and torg514. The answer is 1/(2^(n-1))

If the king has only 1 child, there is a 100% probability that it is a girl 1/(2^(1-1))=1/(2^0)=1/1=1

If the king has a 2 children, there is a 100% chance that one is a girl and a 50% chance the other is a girl: 1 X 1/2 = 1/2

If the king has a 3 children, there is a 100% chance that one is a girl and a 50% chance the each of the other two are girls: 1 X 1/2 X 1/2 = 1/4

etc.

So to summarize, when n = 1, there is a probability of 1 that all of the kings children are girls. When n = 2, the is a probability of 1/2 that all of the kings children are girls. When n = 3, the is a probability of 1/4 that all of the kings children are girls. Etc.

The formula that characterizes this result is P(all girls) = 1/(2^(n-1))

Another way to look at it is to identify the possible combinations. For clarity, I will use a capital G to indicate the one child that has a 100% chance to be a girl.

If 1 child: G --> 1/1 chance all children are girls

If 2 children: Gg or Gb --> 1/2

If 3 children: Ggg, Ggb, Gbg, Gbb --> 1/4

IF 4 children: Gggg, Gggb, Ggbg, Gbgg, Ggbb, Gbgb, Gbbg, Gbbb --> 1/8

  • If the king has more than 1 child, then from the information given, none of the children have a 100% chance of being a girl. No matter what child you pick, the possibility that that child is a boy and one of the others is a girl is consistent with the given information. –  Oct 17 '15 at 17:50