Happy Birthday! There's a birthday in your class today! Or will there be two? How likely is it that two people in your class have the same birthday? Say your class has 28 students.
There are a number of ways to approach this problem. The most common is to take a survey and see if it happens that two birthdays fall on the same day. But if it happens in the surveyed class, will it occur in another class with different students? The question of how likely it is for any given class is still unanswered.
Another way is to survey more and more classes to get an idea of how often the match would occur. This can be time consuming and may require a lot of work. But a computer can help out. Below is a simulation of the birthday problem. It will generate a random list of birthdays time after time.
Choose a number for your class size and run several trials with that size. The simulation will graph the average calculated probability of each class size. The list on the right will display the last set of birthdays generated.
The results table at the bottom of the simulation will display trial statistics for the current class size.
The class size can be changed by clicking on the graph, entering a new number in the text box, or using the arrow keys while the graph is selected.
|Number of dates duplicated||0|
|Average # of dates duplicated||0.0|
|Trial effect on average||0.0|
|Number of trials||0|
Now what do you think the probability of a match is? It may surprise you that there were so many matches. Let's look at an explanation for this problem.