this is not true for n=2 - if you are second in the line, then probability is 1/365 and formula above gives Pn|n=2 = P[2] = 1/365^2 ...

Quantitative Analyst Interview New York, NY

Morgan StanleyAnswer## A line in front of movie theater, a free ticket is to given

to the first person whose birthday is the same as someone who has already bought a ticket. You choose the position in this line, which position have the largest chance of getting the free ticket?

3 Answers

▲

0

▼

this is not true for n=2 - if you are second in the line, then probability is 1/365 and formula above gives Pn|n=2 = P[2] = 1/365^2 ...

▲

0

▼

probability to get free ticket at position k is the product of

-- the probability that none of the people at positions between 2 and k-1 got the free ticket

and

--the probability that the k-th person has the same birthday with the previous k-1 people.

at a certain m-th position, given that there all the previous (m-1) people have different birthdays, the probability that the m-th person does not have the same birthday as one of the previous (m-1) people is (365 - (m-1)) / 365 . and the probability that he/she does have the same birthday as one of the previous (m-1) people is (m-1) / 365

--> probability to get free ticket at position k is : (n = 365)

p(k) = (n-1) / n * (n-2)/n * .... * (n - (k-1))/n * (k-1)/n

= (n-1) ! / ( n - (k-1)) ! * (k-1) / n^(k-1)

--> p(k) maximum when k = 20.

To comment on this, Sign In or Sign Up.

Would you like us to review something? Please describe the problem with this {0} and we will look into it.

Your feedback has been sent to the team and we'll look into it.

Possibility to win in he nth position:

Pn=(n-1)*364!/365^n/(366-n)!

It is easy to see that Pn/Pn+1 = 1, where n=19.61, so the best place is n=20.

Note that the above calculation uses a 365 day year (no birthday on 29th Febr).