WalzoneInterview Prep
πŸ“ž Interviewing soon? Practice with a realistic AI mock phone interview β€” it calls you, then scores you. First 15 min FREE β†’

Wall Street Quant Β· Puzzles & Problems Β· question 44 of 155

In a room with N people, what is the minimum value of N such that the probability of two people having the same birthday is greater than 50%?

πŸ“• Buy this interview preparation book: 155 Wall Street Quant questions & answers β€” PDF + EPUB for $5

The Birthday Paradox is a famous problem in probability theory. To solve it, we will first calculate the probability of no two people sharing the same birthday, and then look for the complement probability of at least two people sharing the same birthday.

Assuming there are 365 days in a year (ignoring leap years), we know the probability of the first person’s birthday is 1 since they are the first one in the room.

For the second person not to share their birthday with the first person, there are 364 free days. Therefore, the probability for them not having the same birthday as the first person is $\frac{364}{365}$.

For the third person not to share their birthday with the first and the second person, there are 363 free days. So the probability for them not having the same birthday as anyone else in the room is $\frac{363}{365}$.

Notice the pattern? We can continue similarly for the N people. Then, the probability of no two people sharing the same birthday can be written as:


$$P(\text{no same bday}) = \frac{365}{365} * \frac{364}{365} * \frac{363}{365} * \cdots * \frac{365 - N + 1}{365}$$

Now, we are interested in the probability of at least two people sharing the same birthday, which is the complement of the probability of no two people sharing the same birthday:


P(same bday) = 1β€…βˆ’β€…P(no same bday)

We want this probability to be greater than 50%:


P(same bday) > 0.5

Plug in the expression for P(no same bday):


$$1 - \frac{365}{365} * \frac{364}{365} * \frac{363}{365} * \cdots * \frac{365 - N + 1}{365} > 0.5$$

Now, let’s solve for N.

There is no analytical way to solve for N directly, so we have to calculate it numerically. We can write a simple script or use a spreadsheet to do so. By doing this, we find that the minimum value of N that makes this inequality true is N = 23. Here’s a more detailed calculation:


$$P(\text{same bday}) = 1 - \frac{365!}{365^N(365-N)!}$$

Trying out different values of N:

- For N = 22, P(same bday)β€„β‰ˆβ€„0.475

- For N = 23, P(same bday)β€„β‰ˆβ€„0.507

So, the minimum value of N is 23, and that’s when the probability of at least two people having the same birthday is slightly greater than 50

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Wall Street Quant interview β€” then scores it.
πŸ“ž Practice Wall Street Quant β€” free 15 min
πŸ“• Buy this interview preparation book: 155 Wall Street Quant questions & answers β€” PDF + EPUB for $5

All 155 Wall Street Quant questions Β· All topics