Interview problems: Bayes

Problems:
Suppose a family has two children:
(1) If the first child is a boy, what is the probability that the second child is a boy?

(2) If one child is a boy, what is the probability that the other child is a boy?

(3) If one child is a boy, you make a random guess of the boy's name and it happens that your guess is correct. Then what is the probability that other other child is a boy (assume two boys can have the same name and a girl cannot have a boy's name)?





Solution:
(1) 1/2. Independent events.

(2) 1/3. There are three events with equal probability: (boy, boy), (boy, girl) and (girl, boy).
Compared to (1), here the one boy can be either the first child or the second child.

(3) Let $p$ be the probability that the random guess of the boy's name is correct. In general, $p<<1$, \begin{eqnarray}&&\mathbb{P}(\text{correct guess}|\text{two boys})=1-(1-p)^2=2p-p^2\approx 2p\,, \\ &&\mathbb{P}(\text{correct guess}|\text{one boy and one girl})=p\,.\end{eqnarray}As a result, \begin{equation} \mathbb{P}(\text{two boys}|\text{correct guess})=\frac{2p\cdot 1/4}{2p\cdot 1/4 + p\cdot 1/2}=1/2\,.\end{equation} Compared to (2), making a correct guess of a boy's name increases the asked probability from 1/3 to 1/2. Intuitively, guessing the name correctly is an event with small probability and this rare event is more likely to occur when there are two boys.
In contrast, if the boy name is told directly by his parents insteading of from a random guess, the asked probability should remain 1/3. Mathematically, we should use $p=1$ rather than $p<<1$ when repeating the above calculation.

Comments

Popular posts from this blog

529 Plan

How to offset W2 tax

Retirement Accounts