At a movie theater, the manager announces that they will give a free ticket to the first person in line whose birthday is the same as someone who has already bought a ticket. You have the option of getting in line at any time. Assuming that you don't know anyone else's birthday, that birthdays are distributed randomly throughout the year, etc., what position in line gives you the greatest chance of being the first duplicate birthday?
from http://www.ocf.berkeley.edu/~wwu/riddles/hard.shtml
Suppose there are n persons before you. The probability that there is no duplication in birth dates in these n persons is
C(365, n)/C(365+n-1, n)
Then the probability that you will get a duplication is
p(n) = C(365, n)/C(365+n-1, n) * n/365.
Now the task is to find out n that maximize p(n):
set p(n+1)/p(n) = (365-n)(n+1)/(365+n)/n=1, which yields n=13.