I would really appreciate some help on this one. I'm completely lost. I have no idea why my method doesnt work.

"Your new neighbors have three children. If you are told about three independent observations of a boy, what is the probability that they have three boys?"

I solve it by saying that our sample space is $S = \{bbb,ggg,bgb,bbg,ggb,gbg,gbb,bgg\}$.

If we then introduce the event $A_i = \{$observation i of boy$\}$ and call the event $B=\{bbb\}$

then $P(A_i)=7/8 $ for $i=1,2,3$ and the events $A_i$ are independent according to the problem text. Furthermore, clearly $P(B) = 1/8$.

We now want to calculate the probability

$P(B|A_1 \cap A_2 \cap A_3)$ which is (because of total law of probability/Bayes formula) equal to

$\frac{P(B)P(A_1 \cap A_2 \cap A_3 | B)}{P(A_1 \cap A_2 \cap A_3)}$

Now, $P(A_1 \cap A_2 \cap A_3) = P(A_1)P(A_2)P(A_3)$ because of their independence, and I argue that $P(A_1 \cap A_2 \cap A_3 | B) = 1$ because the probability of observing a boy three times given that there only is three boys should be one hundred percent.

This simplifies to


which is clearly wrong. The answer should be 1/2, but i have no idea how to come up with that.

What am I doing wrong? Thanks!

  • $\begingroup$ If there were any "independent observations" of a girl, would you have been told about them? $\endgroup$ – Henning Makholm Apr 6 '18 at 16:22
  • $\begingroup$ Im not sure if I understand what you're saying. Does the independent observations of the boys dont matter for the problem? $\endgroup$ – tarkovsky123 Apr 6 '18 at 16:25
  • 2
    $\begingroup$ Suppose someone observes the neigbor's house over a day. Three times they see a boy walk out; two times they see a girl walk out. They tell you, "On three independent occasions I have seen a boy". This is a completely true statement; what is the probability that all the neighbor's children are boys? $\endgroup$ – Henning Makholm Apr 6 '18 at 16:35

Since you are asked to give a probability given observations, you need to chose a prior distribution and then update it using Bayes rule, as you suggested. Let say you decide that each child has a probability 1/2 to be a boy, independently of the other children's sex (you could refine this prior, it is generally a bit more than 1/2). You have four events $\{A_0,A_1,A_2,A_3\}$ where $A_i$ is the event that your neighbor has $i$ boys. Before your observation, your prior distribution of probability is, by counting the number of outcomes, $P(A_0)=P(A_3)=1/8$ and $P(A_1)=P(A_2)=3/8$. Let us call $O$ the event "3 independent observations of a child gave me 3 times a boy". You have $P(O|A_3)=1$, $P(O|A_2)=(2/3)^3$, $P(O|A_1)=(1/3)^3$ and $P(O|A_0)=0$ (you can compute them using Bernouilli distributions).

We conclude with Bayes rule $$ P(A_3|O) = \frac{P(O|A_3)P(A_3)}{\sum_i P(O|A_i)P(A_i)} = \frac{1\cdot 1/8}{1\cdot 1/8 + (2/3)^3\cdot 3/8 + (1/3)^3\cdot 3/8 + 0 \cdot 1/8} = 1/2. $$

  • $\begingroup$ Sorry, I redacted it at the same time than Henry's answer! $\endgroup$ – Chila Apr 6 '18 at 17:15
  • $\begingroup$ Thanks!! That really helped. I have one questions though. How can you compute the probabilities $P(O|A_i)$ without Bernouilli distributions ? I havent learned those yet. $\endgroup$ – tarkovsky123 Apr 6 '18 at 17:31
  • $\begingroup$ Since you have three independent observations, the probability of your complete observation (the event i called $O$) is the probability of one observation to the cube. In the case of event $A_3$, the probability of observing a boy one time is $1$, so $P(O|A_3)=1^3=1$. In case of event $A_2$, this probability is $2/3$ (because $2$ children out of $3$ are boys), so $P(O|A_2)=(2/3)^3$, etc. $\endgroup$ – Chila Apr 6 '18 at 17:45

The probability of three observations of boys and zero girls is not $\frac18$ but higher at $\frac14$. Indeed the probability of a million observations of boys and zero girls would still be marginally above $\frac18$ rather than $\frac1{2^{1000000}}$.

One way of presenting the calculation based on your $S$ could be $$\frac{\frac18 1^3 }{\frac18 1^3+ \frac18 0^3 +\frac18 \left(\frac23\right)^3+\frac18 \left(\frac23\right)^3+\frac18 \left(\frac13\right)^3 +\frac18 \left(\frac23\right)^3+\frac18 \left(\frac13\right)^3+\frac18 \left(\frac13\right)^3} =\frac12$$

  • $\begingroup$ Why 1/3 and 2/3? should they not all be 1/2? $\endgroup$ – Maggie Myers Apr 6 '18 at 17:01
  • $\begingroup$ @MaggieMyers There are three children. For example, if there are two boys and a girl, the probability of one observation of a boy (and none of girls) is $\frac23$ and the probability of three observations of a boy (and none of girls) is $\left(\frac23\right)^3$ $\endgroup$ – Henry Apr 6 '18 at 17:07
  • $\begingroup$ How did you calculate that the probability of three observations of boys is 1/4? $\endgroup$ – tarkovsky123 Apr 6 '18 at 17:32
  • $\begingroup$ @tarkovsky123 - it is the denominator $\endgroup$ – Henry Apr 6 '18 at 18:06

We can restate the question as follows. Suppose there are $3$ balls in an urn, and each ball is either black or white with equal probability. We draw one ball from the urn at random, observe the color, and replace it in the urn. Given that after $3$ draws we observed a black ball each time, what is the probability that the urn contains no white balls?

Let the number of white balls in the urn be the random variable $X$. Then before any data is observed, $X$ is presumed to follow a binomial distribution with parameters $n = 3$ and $p = 1/2$. Let $Y$ represent the number of white balls drawn out of $3$ independent trials with replacement. Then we have $$\Pr[X = 0 \mid Y = 0] = \frac{\Pr[Y = 0 \mid X = 0]\Pr[X = 0]}{\Pr[Y = 0]}$$ by Bayes theorem. Since the prior distribution of $X$ is binomial, we have $$\Pr[X = 0] = \binom{3}{0}(1/2)^0 (1 - 1/2)^{3-0} = \frac{1}{8}.$$ Given that there are no white balls, $\Pr[Y = 0 \mid X = 0] = 1$--we cannot draw a white ball if there is none in the urn. The only remaining quantity to be determined is the unconditional probability of $Y = 0$, which by the law of total probability is simply $$\Pr[Y = 0] = \sum_{x=0}^3 \Pr[Y = 0 \mid X = x]\Pr[X = x].$$ We can already compute the first term of this sum, since it is just the numerator in the desired probability. But the other conditional probabilities when $X \in \{1, 2\}$ require more thought. Specifically, the conditional distribution of $Y \mid X = x$ is binomial with parameters $n = 3$ and $p = x/3$. That $n = 3$ is obvious; $Y$ comprises the sum of the number of white balls obtained from three independent draws with replacement from the urn. The probability of observing a white ball in any single draw is determined by the number of white balls in the urn, which is $x$: so if $x = 0$, all balls are black and $p = 0$, reflecting the impossibility of drawing a white ball. If $x = 1$, then $p = 1/3$ reflects a $1/3$ chance of drawing a white ball. Thus $$\Pr[Y = y \mid X = x]\Pr[X = x] = \binom{3}{y}(x/3)^y (1 - x/3)^{3-y} \cdot \binom{3}{x} (1/2)^x (1 - 1/2)^{3-x} = \frac{1}{216} \binom{3}{x}\binom{3}{y} x^y (3-x)^{3-y}.$$

With this in mind, we compute $$\Pr[Y = 0] = \frac{1}{216} \sum_{x=0}^3 \binom{3}{0} \binom{3}{x} x^0 (3-x)^3 = \frac{54}{216} = \frac{1}{4}.$$ It follows that $$\Pr[X = 0 \mid Y = 0] = \frac{1/8}{1/4} = \frac{1}{2}.$$

From here, the sophisticated student can easily generalize to the case where we are given $n$ balls in the urn, each with a prior probability $p$ of being white, and $m$ iid draws from the urn, in which $y$ are observed white. Then the posterior distribution of the number of white balls is $$\Pr[X = x \mid Y = y] = \frac{\Pr[Y = y \mid X = x]\Pr[X = x]}{\Pr[Y = y]} = \frac{\binom{m}{y} (x/n)^y (1 - x/n)^{m-y} \binom{n}{x} p^x (1-p)^{n-x}}{\sum_{k=0}^n \binom{m}{y} (k/n)^y (1 - k/n)^{m-y} \binom{n}{k} p^k (1-p)^{n-k}}.$$


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.