# Question: It is surprising but true that if 23 people are

It is surprising (but true) that if 23 people are in the same room, there is about a 50% chance that at least two people will have the same birthday. Suppose you want to estimate the probability that if 30 people are in the same room, at least two of them will have the same birthday. You can proceed as follows.

a. Generate random birthdays for 30 different people. Ignoring the possibility of a leap year, each person has a 1/365 chance of having a given birthday (label the days of the year 1 to 365). You can use the RANDBETWEEN function to generate birthdays.

b. Once you have generated 30 people’s birthdays, how can you tell whether at least two people have the same birthday? One way is to use Excel’s RANK function. This function returns the rank of a number relative to a given group of numbers. In the case of a tie, two numbers are given the same rank. For example, if the set of numbers is 4, 3, 2, 5, the RANK function returns 2, 3, 4, 1. (By default, RANK gives 1 to the largest number.) If the set of numbers is 4, 3, 2, 4, the RANK function returns 1, 3, 4, 1.

c. After using the RANK function, you should be able to determine whether at least two of the 30 people have the same birthday. What is the (estimated) probability that this occurs?

a. Generate random birthdays for 30 different people. Ignoring the possibility of a leap year, each person has a 1/365 chance of having a given birthday (label the days of the year 1 to 365). You can use the RANDBETWEEN function to generate birthdays.

b. Once you have generated 30 people’s birthdays, how can you tell whether at least two people have the same birthday? One way is to use Excel’s RANK function. This function returns the rank of a number relative to a given group of numbers. In the case of a tie, two numbers are given the same rank. For example, if the set of numbers is 4, 3, 2, 5, the RANK function returns 2, 3, 4, 1. (By default, RANK gives 1 to the largest number.) If the set of numbers is 4, 3, 2, 4, the RANK function returns 1, 3, 4, 1.

c. After using the RANK function, you should be able to determine whether at least two of the 30 people have the same birthday. What is the (estimated) probability that this occurs?

**View Solution:**## Answer to relevant Questions

Simulation can be used to illustrate a number of results from statistics that are difficult to understand with non-simulation arguments. One is the famous central limit theorem, which says that if you sample enough values ...If the number of competitors in Example 16.1 doubles, how does the optimal bid change?In the cash balance model from Example 16.5, is the $250,000 minimum cash balance requirement really “costing” the company very much? Answer this by rerunning the simulation with minimum required cash balances of ...Suppose you currently have a portfolio of three stocks, A, B, and C. You own 500 shares of A, 300 of B, and 1000 of C. The current share prices are $42.76, $81.33, and $58.22, respectively. You plan to hold this portfolio ...You have $5 and your opponent has $10. You flip a fair coin and if heads comes up, your opponent pays you $1. If tails comes up, you pay your opponent $1. The game is finished when one player has all the money or after 100 ...Post your question