Learn By Doing – Relative Frequency

Published: January 7th, 2013

Category: Activity 1: Learn By Doing, Activity 3: Simulations and Tools


Recall from the introduction to probability section the birthday problem, which was presented as an example of when probability is counterintuitive. In particular, recall that we asked: “What is the probability that at least 2 people out of a group of 60 will have the same birthday?” The answer, a 99.4% chance, was very surprising.

How about the probability of at least one “birthday match” in a group of 30 people?

At this point in the course, we do not have the tools needed to solve this problem, so the best we can do is to estimate this probability using relative frequency.


As before, to simplify things we will ignore leap years (i.e., we will assume that all years have 365 days) and we will assume that all days of the year are equally likely to be birthdays.

The Plan

Using the applet below, we will generate (with replacement) 30 birthdays. The group of 30 birthdays represents a group of 30 people. We will then observe whether any birthday is repeated (i.e., whether there is at least one birthday match in the group). To use the relative frequency idea, we will then repeat this process 20 times, and count how many of the 20 repetitions had at least one birthday match. This relative frequency will be our estimated probability of at least one birthday match in a group of 30 people.

This applet keeps track of how many of the samples had at least one match.

The Simulation

Step 1: Enter 30 in the box for Number in Room and click SIMULATE.

Notice that random birthdays are generated, then sorted to make it easier to find the matches.

Step 2: Click Simulate 19 more times to generate 20 total samples. Notice the applet calculates the relative frequency of samples which have at least one match.



This document is linked from Introduction to Probability.