Relative Frequency and the Law of Large Numbers

Now you will learn about relative frequency, which is closely related to the law of large numbers.

You have previously learned that the probability of getting a five when you roll a die is 1 6. But how do you really know it’s exactly 1 6?

Die showing a five

If you roll a die 12 times, you may not get a five exactly one sixth of the time. After 12 throws that would be

12 1 6 = 12 6 = 2

times. You may get five fives, three fives, or maybe no fives.

To get an answer as to why we say the probability of getting a five when you roll a die is 1 6, you need to learn two new concepts: relative frequency and simulation.

Relative Frequency

Imagine rolling a die 12 times and writing down how many fives you get. The relative frequency is the ratio of how many fives you got (number of favorable outcomes), to how many times you rolled the die (number of trials). If you got three fives, the relative frequency is

3 12 = 1 4 = 0.25

This is a lot more than you expected, which was 1 6. So let’s look at why.

The relative frequency of getting a five when rolling a die does not need to be the same as the probability (1 61 4). But if you roll a die a lot of times, for example 100000 or 1000000 times, the relative frequency of getting a five will be just about the same as the probability of getting a five.

Note! The relative frequency approaches the probability when the number of trials becomes very large!

Theory

The relative frequency is the ratio between how many times an event occurs n, and how many times it can happen N:

Relative frequency = n N

Law of Large Numbers

The average age of people in the US is about 38 years old. You decide to personally ask a bunch of people how old they are. After you ask each person, you calculate the average age of the people you have asked so far. How many people do you have to ask before you get 38 years old as the average? Maybe it’s sometimes sufficient to ask five people. But what if the five you asked are all a group of friends in junior high? Then you will certainly not find the average age of the population to be 38 years old.

It makes sense that the answer is 38 if you just ask enough people. But how many are enough?

This is what the law of large numbers has something to say about.

Rule

The Law of Large Numbers

If you perform an experiment with a large number of trials, the results of the experiment will approach the expected value of the experiment.

Unless you are investigating something very unlikely, then somewhere between 1000 and 10000 trials will be enough. It would be difficult to ask 10000 random people in the US about their age and not get an average very close to 38.

Below, I made a graph of the relative frequency of getting a five when rolling a die. The x-axis shows the number of throws, which is the number of trials, and the y-axis displays the relative frequency for getting a five. The black line through the middle illustrates the theoretical probability of getting a five when rolling one die, which should always be 1 6.

Graph representing probabilty of getting a five rolling a die

You can see from the figure that after approximately 1500 throws, the blue relative frequency has stabilized very close to the actual probability in black.

Next, let’s look at some examples where it’s important to know the law of large numbers.

Example 1

You decide to try your luck at gambling. There’s a 5 % chance of winning. If you only play a few times, you may win or lose. Those who host the game will most certainly make money 95 % of the time as long as there are many people playing the game. The law of large numbers favors the host.

Example 2

I think it is wise to insure my house, because I’m afraid that something bad will happen to it. For example, a fire or another accident beyond my control may occur. The insurance company must know how likely it is that damage will occur in order to calculate how much my insurance will cost. If my house burns down, the insurance company will have to pay me a lot of money. I have to pay a much smaller monthly amount to the insurance company for full coverage in the event this happens.

Let’s say there’s a 0.3 % chance of an accident occurring, meaning a 0.3 % chance they would have to pay me for the house. They have to hope that sufficiently many people choose to take out insurance with them, and then they can use the law of large numbers to estimate how much my insurance should cost. If they have a relatively small base of customers, and a fire suddenly burns down five houses, they will lose a lot of money.

Simulation

Rolling a die 1000000 times to see how many fives you get would be quite tiring and very time consuming. But if you did, you would end up getting about 166667 fives. That would be a relative frequency of 166667 1000000 1 6, and you can see that this is exactly the same as the probability of getting a five!

To avoid having to roll a die 1000000 times, you can do a simulation instead, using a computer program to do the experiment for you.

Simulating means that we are imitating an experiment from reality on a computer. We can mimic dice rolls on the computer, rolling a virtual die many, many times over a short period of time. In this way, you’re then able to see what the probability of an event is, with the computer’s help. The computer calculates the relative frequency for such a large N that the relative frequency becomes the same as the probability.

Computers are a very important tool when working with probability.

Want to know more?Sign UpIt's free!