Chapter 11 · Probability
Probability Models from Data: Build and Predict
Turn the results of many trials into a probability model, then use the model to predict about how often an outcome will happen in future trials.
Toss a paper cup and it can land in three ways: on its side, with its open end down, or with its open end up. Each possible result is called an outcome. What is the probability of each one?
A probability model is a list of every outcome together with its probability. In the last lesson your models were uniform: every outcome was equally likely, so a probability was the number of favourable outcomes (the ones you want) over the total number of outcomes. That fraction is a probability only when the outcomes are equally likely. A cup is lopsided, and nothing tells you that its three landings are equally likely, so counting outcomes cannot give you their probabilities.
What you can do is toss the cup many times and count what happens. In this lesson you will turn counts like these into a probability model, and then use the model to predict future results.
Three terms describe the counting.
- A trial is one run of a chance process (an action whose result depends on chance), such as one toss of the cup. You must run every trial the same way, so that the probabilities stay the same from trial to trial.
- The observed frequency of an outcome is the number of trials in which that outcome happened.
- The relative frequency of an outcome is its observed frequency divided by the total number of trials. It tells you what fraction of the trials gave that outcome.
Why does relative frequency help? A probability describes the long run. If an outcome has probability , then over many trials it happens in about of them. So you can reason backwards: if an outcome happened in about of a large number of trials, then is a sensible estimate of its probability.
The words many trials matter. The record below shows why.
| Tosses so far | Side landings so far | Relative frequency of a side landing |
|---|---|---|
After only tosses, the relative frequency of a side landing was . After tosses it was . With few trials, each toss is a large share of the record, so a lucky or unlucky run moves the value a lot. With many trials, each toss is a small share, and the value tends to settle: after tosses and after .
So a relative frequency is a good estimate of a probability only when it comes from many trials. No fixed number counts as many, but in general more trials make the estimate more trustworthy. Even then it is an estimate, not the exact probability.
You show this with the sign , which means is approximately equal to. Writing for the probability that the cup lands on its side, the record gives .
Key concept
Counts build the model; the model predicts counts
When you cannot assume equally likely outcomes, build the probability model from data: estimate each outcome's probability by its relative frequency over many trials run the same way.
Every probability model has these properties, so use them as checks:
- each probability is at least and at most , so ;
- the probabilities of all the outcomes add to ;
- for any event (one outcome or a group of outcomes), the probability that does not happen is , because in each trial either happens or does not.
The model also predicts. In new trials run the same way, an outcome should happen in about the same fraction of the trials. That prediction is an approximate count, not a guarantee.
| Outcome | Observed frequency |
|---|---|
Lands on its side | |
Lands with its open end down | |
Lands with its open end up |
Worked example
Developing a model from 200 tosses
The table above records tosses of one paper cup: landed on its side, open end down and open end up. Develop a probability model for one toss of this cup.
Add the observed frequencies to confirm the total number of trials. Each toss landed in exactly one of the three ways, so the three counts together must cover all 200 tosses.
Find the relative frequency of a side landing, which estimates its probability: divide its observed frequency by the total number of trials. Dividing the numerator and the denominator by 2 gives an equivalent fraction out of 100, which is easy to write as a decimal.
Do the same for the other two outcomes, because the same reasoning applies to each: open end down first, then open end up.
Check the model. Each value is at least 0 and at most 1. The three outcomes cover every way the cup can land, and no toss lands two ways at once, so the three probabilities must add to 1.
Answer
A probability model for one toss of this cup is , and . These values are estimates based on tosses, not exact probabilities.
Now run the idea forwards. The model says a side landing happens in about of the tosses in the long run, which is about in every . So if you toss the same cup the same way again, you can predict roughly how many side landings to expect.
The expected count of an outcome is the model's prediction of how many times the outcome will happen in a given number of trials. A probability is the fraction of trials you expect the outcome to take up, so the expected count is the probability multiplied by the number of trials.
Two conditions come with every prediction. First, you must run the new trials the same way as the trials that built the model. Second, an expected count is an approximate prediction, not a guarantee. The probability in the model is itself an estimate, and chance still decides each trial, so the actual count may come out above or below the expected count.
Worked example
Predicting with the cup model
The model from tosses gives . You plan to toss the same cup the same way more times. About how many times should you expect the cup to land on its side? About how many times should you expect it not to land on its side?
Multiply the probability of a side landing by the number of new tosses, because a side landing should happen in about 0.72 of them. Since 0.72 is 72 hundredths and 300 divided by 100 is 3, the product is 72 times 3.
Find the probability that the cup does not land on its side. Each toss either lands on its side or does not, never both, so the two probabilities add to 1. Subtract the probability of a side landing from 1.
Multiply this probability by the number of new tosses, because tosses that do not land on the side should make up about 0.28 of them. The arithmetic follows the same pattern as before.
Check the two expected counts. Each toss belongs to exactly one of the two groups, so the counts must add to the number of tosses.
Answer
In tosses you should expect about side landings and about landings that are not on the side. These are approximate predictions, so the actual counts may come out somewhat higher or lower.
Worked example
From draws to a model to a prediction
A bag holds red, blue and green tiles. You do not know how many of each colour it holds. A class draws one tile without looking, records its colour and puts the tile back, times in all. The results are red , blue and green . Develop a probability model for one draw. Then predict about how many of the next draws, made the same way, will not be green.
Check the conditions first. The tile goes back each time, so every draw starts with the same tiles in the bag and is a repeat of the same trial. If drawn tiles were kept out, the tiles available for later draws would change, and the draws would not be repeats of one trial. With 250 draws, there are also enough trials for relative frequencies to give reasonable estimates.
The three counts, 115, 85 and 50, add to 250, so every draw is included. Divide the observed frequency of red by 250. Multiplying the numerator and the denominator by 4 gives an equivalent fraction out of 1000.
Find the relative frequencies of blue and green the same way.
Check the model. Each value is at least 0 and at most 1, and every draw gives exactly one of the three colours, so the three values must add to 1.
A tile that is not green is red or blue. Each draw is either green or not green, never both, so subtract the probability of green from 1.
Multiply by the number of new draws to get the expected count. Since 0.80 is 8 tenths and 450 divided by 10 is 45, the product is 8 times 45.
Answer
A model for one draw is , and . Of the next draws, you should expect about not to be green, though the actual count may come out somewhat higher or lower.
Takeaway. When you cannot assume equally likely outcomes, let data build the probability model: over many trials run the same way, each outcome's relative frequency estimates its probability. Check that every probability is at least and at most and that together they add to .
Then let the model predict: multiply a probability by a number of new trials to get an expected count. When you need the probability that an event does not happen, use . An expected count is an approximate guide, not a guarantee.
Predictions and real results will not always agree. Next, you will compare the probabilities from a model with observed frequencies and explain the differences between them.