I’ve recently come upon two probability problems with counterintuitive solutions. One I’d seen before and dismissed because I didn’t understand the write-up (mea culpa); the other is new to me.

### Born on a Sunday

Puzzle: *You are introduced to a randomly selected family that happens to have two children. If one is a girl that was born on Sunday, what is the probability that the other one is a girl?*

This is derived from the Birthday Problem, attributed to Martin Gardner: *You are introduced to a randomly selected family that happens to have two children. If one is a girl, what is the probability that the other one is a girl?*

In both cases, we’re assuming that the probability of a girl is 50% and the probability of being born on a particular day is 1/7. Neither of these is entirely true in the real world, but it’s close enough for government work.

In the case of the Birthday Problem, there are four possible combinations of children. Using B for boy and G for girl, and listing the younger child first, we have BB, BG, GB, and GG. These have an equal likelihood of happening. However, we’re told that BB is not a possible scenario. Hence, our combinations are BG, GB, and GG: These all have the same probability of occurring, and in only one case are both children girls. The probability is 1/3.

What the Sunday element does is introduce a weight to the situation. Indeed, if we were going to find the actual likelihood of having two girls in the real world, we’d need to have statistics on birth gender likelihoods in two-child families.

It’s counterintuitive to think that the day of the week matters, but it does. There are fourteen possible gender-day combinations for each child, for a total of \(14^2=196\) possible gender-day combinations for two children.

However, the vast majority of these are irrelevant to the conditions provided, because they don’t include a girl born on Sunday. Let’s create a table showing the probability of each occurrence. A subscript S represents a child born on Sunday; N means they weren’t. The rows represent the younger child and the columns, the older one.

B_{S} |
G_{S} |
B_{N} |
G_{N} |
||

1/14 | 1/14 | 6/14 | 6/14 | ||

B_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

G_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

B_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

G_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

Let’s now gray out those cases where there’s not a girl born on Sunday:

B_{S} |
G_{S} |
B_{N} |
G_{N} |
||

1/14 | 1/14 | 6/14 | 6/14 | ||

B_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

G_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

B_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

G_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

There is only a 27/196 probability that *either* child will be a girl born on a Sunday. Let’s now highlight the cases where both children are girls:

B_{S} |
G_{S} |
B_{N} |
G_{N} |
||

1/14 | 1/14 | 6/14 | 6/14 | ||

B_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

G_{S} |
1/14 | 1/196 | 1/196 | 6/196 | 6/196 |

B_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

G_{N} |
6/14 | 6/196 | 6/196 | 36/196 | 36/196 |

In total, there is a 13/196 probability that both children will be girls if one is a girl born on Sunday, and a 27/196 probability that one of the girls was born on Sunday. That means there’s a 13/27 (not a 1/2) probability that, if we know one girl was born on Sunday, both are girls.

### Random Hats

*You and a friend are going to have three hats on your heads. These hats have an equal chance of being black or white. Each of you can only see the hats on the other person’s head. You must randomly choose a hat of your own to point to, and once you’ve made a choice, you cannot change it. You may not communicate with your friend in any way. If you both point to a white hat, you win; if either of you points to a black hat, you lose. What strategy should you use?*

Intuitively, it would seem that, since you can’t communicate with your friend, it doesn’t matter what strategy you use. If you choose a hat of yours at random, you’ll have a 1/2 chance of picking white; the same is true for your friend. So it would seem that your total chances are 1/4.

But there’s at least one simple strategy that improves your chances. Each of you should point to the hat on your head the corresponds to the lowest white hat on your friend’s stack. As the number of hats increases, your probability of winning using this strategy approaches 1/3. (I’m told there are other strategies that improve on this.)

First, let’s ignore all but the bottom hats. Let’s denote you with Y and your friend with F, and let’s denote the white hat with W and the black hat with B. There are four possibilities, with an equal chance of occurring: Y_{W}F_{W}, Y_{W}F_{B}, Y_{B}F_{W}, Y_{B}F_{B}. In the first case, you both point at your own bottom hat, and you win; this represents a 1/4 probability. In the last case, you both consider a higher hat. In the middle two cases, one of you points to the lowest hat and you both lose; this represents a 1/2 probability. So you have a 1/4 chance of winning, a 1/2 chance of losing, and 1/4 chance of having to look at the second hat.

The second hat has the same probability, so you have a \(\frac{1}{4}\frac{1}{4} = \frac{1}{16}\) chance of winning when you both point to the second hat, and the same probability of having to look at the third hats.

There is likewise a \(\frac{1}{64}\) chance of winning when you both point at the topmost hat. Overall, this gives you a \(\frac{1}{4} + \frac{1}{16} + \frac{1}{64} = \frac{21}{64} \approx 0.328 \) chance of winning using this strategy.

Notice, by the way, that in the winning scenarios, you both wind up pointing to the same-level hat. Another way of describing this situation, then, is: Given two random binary numbers, what is the probability that the first 0 in each appears in the same place?

If there are an infinite number of hats, what is the probability of winning using this strategy?

Well, to figure that out, we need to formalize the probability. We saw that it’s \(\frac{1}{4} + \frac{1}{4^2} + \frac{1}{4^3}\) for three hats. For an arbitrary number of hats, the formula is \(\sum_{i=1}^n \frac{1}{4^n}\), and the limit at infinity is \[\lim_{n \to \infty} \sum_{i=1}^n \frac{1}{4^n}\]

We can find this limit by determining the sum. If we paste the formula into Wolfram Alpha, we’re told that \(\sum_{i=1}^n \frac{1}{4^n} = \frac{1}{3} – \frac{1}{3(4^n)}\). How can we confirm this?

Instead of 4, let’s use x, and take the specific case of four elements. That is, let’s see if we can prove: \[\frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \frac{1}{x^4} = \frac{1}{x-1} – \frac{1}{(x-1)x^4}\]

We can rewrite the right hand side using a common denominator: \[\frac{1}{x-1} – \frac{1}{(x-1)x^4} = \frac{x^4}{x-1} – \frac{1}{(x-1)x^4} \\ = \frac{x^4 – 1}{(x-1)x^4} \] while the left hand side rewrites to: \[\frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \frac{1}{x^4} = \frac{x^3}{x^4} + \frac{x^2}{x^4} + \frac{x}{x^4} + \frac{1}{x^4} \\ = \frac{x^3 + x^2 + x + 1}{x^4}\]

These are equal if \(\frac{x^4 – 1}{x-1} =x^3 + x^2 + x + 1\), that is, if \(x^4 – 1 =(x-1)(x^3 + x^2 + x + 1)\)… which is true.

Since \(\sum_{i=1}^n \frac{1}{x^n} = \frac{1}{x-1} – \frac{1}{(x-1)(x^n)}\), \[\lim_{n \to \infty} \sum_{i=1}^n \frac{1}{4^n} = \frac{1}{3} – \lim_{n \to \infty} \frac{1}{3\cdot 4^n} = \frac{1}{3} – 0 = \frac{1}{3}\] Given an infinite number of hats, there is a 1/3 chance of winning, using this strategy.