Q.1) A family has $n$ children, $n\geq2$. We ask from the father, "Do you have at least one daughter named Lilia?" He replies, "Yes!". What is the probability that all of their children are girls?

In other words, we want to find the probability that all $n$ children are girls, given that the family has at least one daughter named Lilia.

Here we can assume that if a child is a girl, her name will be Lilia with probability $\alpha\ll1$ independently from other children's names. If the child is a boy, his name will not be Lilia.

Q.2) In a family of $n$ children. We pick one among them and found that she is a girl. What is the probability that all children are girls?

My solution to Q.1)

$$ \begin{equation} \begin{split} P(\text{all are girls | at-least one named Lila}) &= \frac{P(\text{at-least one name Lila | all are girls})\ \times\ P(\text{all are girls})}{P(\text{at-leat one named Lila})}\\ &= \frac{{n\choose1}\ \alpha\ (1-\alpha)^{n-1}\ \times\ \frac{1}{2^n}}{{n\choose1}\ \alpha \ \frac{1}{2^{n-1}}} \end{split} \end{equation}$$

My solution to Q.2)

$$\begin{equation} \begin{split} P(\text{all are girls | at-least one girl}) &= \frac{P(\text{at-least one girl | all are girls})\ \times\ P(\text{all are girls})}{P(\text{at-least one girl})}\\ &= \frac{1\ \times\ \frac{1}{2^n}}{{n\choose1}\ \frac{1}{2} \ \frac{1}{2^{n-1}}} \end{split} \end{equation}$$

  • $\begingroup$ An observation: If all girls were named Lila then the first question would be equivalent to "have you got a daughter"? But this is same as taking $a=1$...and as your formula appears to yield $0$ in that case I think there must be an error somewhere. $\endgroup$
    – lulu
    Aug 15, 2016 at 14:56
  • $\begingroup$ You might consider simplifying your results: for example your answer to Q2 looks like $\dfrac1n$ which I would have thought was was too high for large $n$ $\endgroup$
    – Henry
    Aug 15, 2016 at 14:57
  • $\begingroup$ You seem to have wrong probabilities for the “at least one” cases. For example, the probability that a set of $n$ children contains at least one girl is $1-\frac1{2^n}$, not ${n\choose1}{\frac12}{\frac{1}{2^{n-1}}}$. $\endgroup$
    – Steve Kass
    Aug 15, 2016 at 14:57
  • 1
    $\begingroup$ Also: for question $2$, this is not the same as "at least one girl". The question states that you chose a child randomly and observed that it was a girl. That's quite different. $\endgroup$
    – lulu
    Aug 15, 2016 at 14:59
  • $\begingroup$ Can you confirm that you intended that the probability a randomly selected kid is a girl is $\frac 12$? I have assumed that in everything I posted below, but of course you do not state it anywhere. $\endgroup$
    – lulu
    Aug 15, 2016 at 15:56

3 Answers 3


Alright so the first question seems to be confusing some people. Let $B$ be the event of all boys. The complement of $B$ is $B^c$, which is the event of at least one girl. Here is where confusion then plays out: is $B^c$ the same as a girl named Lilia? Does this mean that if you have at least one girl, then her name will be Lilia? No because her name could have been any other name, the fact that the child is named Lilia simply indicates that in addition to having a child named Lilia, you now have at least one girl. Now let $L$ be the event that none of the $n$ children be named Lilia. There is some more hidden information. When the problem states that the probability of Lilia is $\alpha<<1$, the problem actually assumes that you are expected to see the names of other girls repeat, such as Mary, before the name Lilia is first encountered. That being said, let $L^c$ be the event of at least 1 Lilia. Let $G$ be the event that all children are girls, let $c_i$ denote the event of the $i_{th}$ child. Finally consider Baye's Rule: $$P(G|(B^c\cap{L^c})){\times}P(B^c\cap{L^c})= P((B^c\cap{L^c})|G){\times}P(G)$$ The problem specifically asks for $P(G|(B^c\cap{L^c}))$. So now it is time to find all the other pieces of equation. Assuming that child $c_i$ has an equal of probability of being girl or boy, then $P(G) = ({\frac{1}{2}})^n$. Moving on to the next term $P((B^c\cap{L^c})|G)$, which denotes the probability of at least one girl, and at least one Lilia, given that all the children are girls. If a child that is also a girl has a probability $\alpha$ of being named Lilia, then that child that is also a girl has a probability of $1-\alpha$ of not being named Lilia. $L$ is the event that none of the children are named Lilia, and in this particular case, there are n girls, and so now consider the probability that none of the n girls are named Lilia, which is $(1-\alpha)^n$. However, in reality, the event of at least one Lilia is sought, thus $P((B^c\cap{L^c})|G) = (1-(1-\alpha)^n)$. Here you can ignore the $B^c$, the event of at least one girl, because you are given n girls as per the conditional.

Finally consider the last portion of the problem, $P(B^c\cap L^c)$. This is the event of at least one girl, and at least one girl named Lilia. One basic rule in Set theory essentially allows this problem to be reformulated as $P((B \cup L)^c)$, which is the complement of the event of all boys or all children are not named Lilia. Then it follows that $P((B \cup L)^c) = 1 - P(B \cup L)$. To find how these quantities interact, consider the Addition Rule of non-disjoint sets such that $P(B \cup L) = P(B)+P(L)-P(B \cap L)$. The event of all boys is equal to $P(B) = (\frac{1}{2})^n$, and then $P(B \cap L) = P(L|B) \times P(B) = 1 \times (\frac{1}{2})^n$. This is true because if you have all boys, then probability of no Lilias is subsequently 1. This means that $P(B \cup L) = P(L)$. So what is the probability that no child will be named Lilia. Is important to consider that this includes both boys and girls, because boys will certainly not be named Lilia, and only a select number of girls will be named Lilia. Let $L_i$ be the event where the $i_{th}$ child is not named Lilia. Then $$P(L_i) = P(L_i \cap c_i=g)+P(L_i \cap c_i=b) = P(L_i|c_i=g) \times P(c_i=g) + P(L_i|c_i=b) \times P(c_i=b)$$ This yields, $P(L_i) = (1-\alpha) \times (\frac{1}{2})+(1) \times (\frac{1}{2}) = (\frac{1}{2})(2-\alpha)$. Then the probability that all n children are not named Lilia is $P(L) = ((\frac{1}{2})(2-\alpha))^n = \frac{(2-\alpha)^n}{2^n}$. Going a little far back, $P((B \cup L)^c) = 1-P(L) = 1-\frac{(2-\alpha)^n}{2^n}= \frac{2^n-(2-\alpha)^n}{2^n} $

Finally, $$P(G|(B^c\cap{L^c})) = \frac{P((B^c\cap{L^c})|G){\times}P(G)}{P(B^c\cap{L^c})}$$

$$= ((1-(1-\alpha)^n) \times \frac{1}{2^n}) \div \frac{2^n-(2-\alpha)^n}{2^n}$$

$$= (\frac{((1-(1-\alpha)^n)}{2^n}) \times (\frac{2^n}{2^n-(2-\alpha)^n}$$

Obviously the answer is completely dependent on being given a girl named Lilia. It might not seem intuitive at first, but consider it this way, instead of boys and girls, use blue and red colored shapes. Blue shapes have an odd number, and red shapes have an even number. Also, imagine having way more lower numbers than larger numbers. So if I tell you that there is at least one red colored shape with a really large even number, then the predicted number of reds should go up from your initial estimate.

Problem 2 Okay and for problem 2, I am assuming that a girl is picked at random. If that's the case, then the problem is quickly reduced. First let, $E$ be the event of random picking a girl. However this isn't all that is actually said. In reality, you picked one of the children, and then it turns out that the child may be either boy or girl. Let $p_i$ be the event of selecting $i_th$ child. This is all equivalent to $E = (C_1 \cap p_1) \cup (C_2 \cap p_2) \cup ... \cup (C_n \cap p_n)$. Note that each of these events are actually disjoint, that is picking the 1st child is separate from picking the 2nd child and so on. Thus $$P(E) = P(C_1 \cap p_1) +P(C_2 \cap p_2) + ... +P(C_n \cap p_n) = P(C_1 | p_1) \times P(p_1) + P(C_2 | p_2) \times P(p_2) + ... + P(C_n | p_n) \times P(p_n) $$ Thus, $$P(E) = (\frac{1}{2} \times \frac{1}{n}) + (\frac{1}{2} \times \frac{1}{n}) + ... + (\frac{1}{2} \times \frac{1}{n}) = (\frac{1}{2n}) \times (1+1...+1) = \frac{n}{2n} = \frac{1}{2}$$

Now use Bayes Rule to solve the remainder of the problem. Let $G$ be the event that all children are girls. So $$P(G | (B^c \cap E)) \times P(B^c \cap E) = P((B^c \cap E) | G) \times P(G) = P(G | (B^c \cap E)) \times P(B^c | E) \times P(E) = 1 \times \frac{1}{2^n}$$ So if you are given all girls, the probability of at least 1 girl AND picking a girl at random is now 1. Hopefully the probability of G is obvious. It should also be obvious that if you pick any girl at random, then you have at least 1 girl so that is simply 1. Then, $$P(G | (B^c \cap E)) = (\frac{1}{2^n}) \div (1 \times \frac{1}{2}) = (\frac{1}{2^n}) \times 2 = \frac{1}{2^{n-1}}$$ A similar but more complicated approach can be reached using the binomial expansion although it can be tedious to follow along.


I'll answer question $2$ for you.

Suppose the family had exactly $k$ daughters. Then the probability that a randomly selected kid was one of them is $p(k,n)=\frac kn$. Since your prior probabilities were given by the usual binomial distribution (one presumes) we get $$\frac {1\times 2^{-n}}{\sum_{k=1}^n \frac kn \times \binom nk 2^{-n}}=\frac {1}{\frac 1n \times \sum_{k=1}^n k \binom nk }$$ Now, $\sum_{k=1}^n k \binom nk =\sum_{k=0}^n k \binom nk =n2^{n-1}$ so the answer is $$\frac n{n2^{n-1}}=\frac 1{2^{n-1}}$$

Note: given the simplicity of the final result, I expect there is an intuitive way to get at it. I don't see it at the moment, but I imagine someone else will.

  • $\begingroup$ supposing the man has 2 daughters, you have only ruled out boy/boy, with girl/girl, boy girl, girl boy apparently all equally likely, making the odds 1/3, as agreed with the 1 / (2^n - 1) = 1 / 3 formula - or are they? does the fact that one was called Lila make it twice as likely he had 2 girls compared to girl/boy? $\endgroup$
    – Cato
    Aug 15, 2016 at 15:19
  • $\begingroup$ sorry that was 2, yes I agree with it for 2 $\endgroup$
    – Cato
    Aug 15, 2016 at 15:25
  • $\begingroup$ @AndrewDeighton "Lila" has nothing whatsoever to do with $Q2$. In that question, we just suppose that a randomly selected child turns out to be a girl. That said, I've already made two noteworthy mistakes today so perhaps I've made a third...is my answer still wrong? $\endgroup$
    – lulu
    Aug 15, 2016 at 15:27
  • $\begingroup$ @lulu in solution to Q.2: we could intuitively understand it by saying that we are sure of 1 out of $n$ children that it's a girl. Other $n-1$ children are left. In which the probability that all those n-1 will be girls is given by $\frac{1}{2^{n-1}}$ $\endgroup$ Aug 15, 2016 at 15:47
  • $\begingroup$ @avDec25 Alas, I mistrust arguments like that (may just be a personal thing). You run into the Monty Hall Problem. If the game show host selected the girl (with full knowledge) that would be a very different problem. Easy to confuse one for the other. Still, I like the fact that it confirms my answer! How sure are you of your reasoning? $\endgroup$
    – lulu
    Aug 15, 2016 at 15:51

the name doesn't matter, it's the fact that he has a daughter that matters here

A = all n daughters female B = one child is a daughter

P(A|B) = P(A and B) / P(B)

P(A and B) = P(A) = 1 / 2 ^ n

P(B) = 1 - P(B') = 1 - 1 / 2^n

P(A|B) = (1 / 2^n) / (1 - 1 / 2^n) = 1 / (2^n - 1)

in 2 B = particular girl is female, so it reduces to whether n-1 remaining are female P = 1/ 2^(n -1)

possible rework of 1

assuming the name matters, prob child not called lila, assuming prob girl is called lila = a
P(not lila) = (1 / 2 + (1 - a) / 2) = (1 - a/2)

P(n kids not called lila) = (1 - a/2)^n

p(any kid called lila) = 1 - (1 - a/2)^n

p (has n girls and one called lila) = (1 / 2) ^ n (1 - (1 - a)^n)

P(has n girls|1 called lila) = (1 / 2) ^ n (1 - (1 - a)^n) / {1 - (1 - a/2)^n}

  • $\begingroup$ I'm wondering if the name does matter now! $\endgroup$
    – Cato
    Aug 15, 2016 at 15:24
  • $\begingroup$ Of course the name matters! If, as happens to be the case, Lila is a rare name then knowing that a group contains a Lila increases the probability that the group is "rich in girls", to coin an unwieldy expression. $\endgroup$
    – lulu
    Aug 15, 2016 at 15:28
  • $\begingroup$ I think the name does matter in the first question. Suppose $10\%$ of children are girls named Lilia, $40\%$ are girls not named Lilia, and $50\%$ are boys. Use the letters $k$, $g$, and $b$ for these kinds of children, respectively. The generating function for all $2$-children families is then $(.1k+.4g+.5b)^2=0.25 b^2+0.4 b g+0.16 g^2+0.1 b k+0.08 g k+0.01 k^2$. Nineteen percent of families contain at least one Lilia, and $9\%$ of families contain all girls, at least one of whom is a Lilia. So the probability for $n=2$ should be $\frac9{19}$, not $\frac12$. $\endgroup$
    – Steve Kass
    Aug 15, 2016 at 15:31
  • $\begingroup$ If the group contains exactly $k$ girls then the probability that at least one happens to be a Lila is $1-(1-a)^k$. Thus the, unsimplified, answer is $$\frac {1-(1-a)^n}{\sum_{k=1}^n (1-(1-a)^k)\times \binom nk}$$ $\endgroup$
    – lulu
    Aug 15, 2016 at 15:33
  • 1
    $\begingroup$ @SteveKass So we agree? Phew. It's so easy to multiply interpret phrasing as in this problem. $\endgroup$
    – lulu
    Aug 15, 2016 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.