Chapter 10: Brainteasers 351
that you don’t know anyone else’s birthday, and that
birthdays are uniformly distributed throughout a 365-
day year, what position in line gives you the best chance
of being the first duplicate birthday?
(Thanks to amit7ul.)
Biased coins You havenbiased coins with thekth coin
having probability 1/(2k+1) of coming up heads. What
is the probability of getting an odd number of heads in
total?
(Thanks to FV.)
Two heads When flipping an unbiased coin, how long do
you have to wait on average before you get two heads
in a row? And more generally, how long beforenheads
in a row.
(Thanks to MikeM.)
Balls in a bag Ten balls are put in a bag based on the
result of the tosses of an unbiased coin. If the coin
turns up heads, put in a black ball, if tails, put in a
white ball. When the bag contains ten balls hand it to
someone who hasn’t seen the colours selected. Ask
them to take out ten balls, one at a time with replace-
ment. If all ten examined balls turn out to be white,
what is the probability that all ten balls in the bag are
white?
(Thanks to mikebell.)
Sums of uniform random variables The random variablesx 1 ,
x 2 ,x 3 ,...are independent and uniformly distributed
over zero to one. We add upnof them until the sum
exceeds one. What is the expected value ofn?
(Thanks to balaji.)