Chapter 11 · Probability
Probability Models: Compare with Data and Fix Errors
Compare what a probability model predicts with what actually happened, explain the gaps, and find and fix common errors in models.
A probability model lists every outcome (possible result) of a chance process and gives each outcome a probability: a number from to that tells how likely it is. The full list of outcomes is the sample space. Outcomes are equally likely when they all have the same probability. You write the probability of an outcome such as red as .
A model is a claim about how often each outcome should happen over many trials. Data show what did happen. In this lesson you set the two side by side and judge whether they agree. Three terms describe the data:
- A trial is one run of the chance process, such as one spin or one draw.
- The observed frequency of an outcome is the number of trials in which it happened.
- The relative frequency of an outcome is its observed frequency divided by the total number of trials. For example, reds in draws give a relative frequency of .
You already know how to build a model and predict with it. Today you ask two new questions: does the model agree with the data, and if not, why not?
A probability and a count are different kinds of number, so put them in the same form before you compare. There are two ways:
- Compare rates. Set each model probability beside the relative frequency of the same outcome.
- Compare counts. Multiply each model probability by the number of trials to get the expected count, then set it beside the observed frequency.
The expected count is the number of times the model predicts the outcome. It is proportional to the number of trials: a probability of predicts in trials and in trials. It is an approximate prediction, not a guarantee, and it does not have to be a whole number. Real counts usually land somewhat above or below it. These natural ups and downs are called chance variation.
Why should a model and data ever match? When a model fits the chance process, the relative frequency of each outcome tends to settle close to its probability over many trials. Over only a few trials, chance alone can leave a relative frequency far from the probability, even when the model is right.
Key concept
A model that fits stays close to the data over many trials
If a model fits a chance process, then over many trials each relative frequency tends to be close to the model's probability. Small gaps are normal, because a model's predictions are approximate expected counts, never guarantees.
A large gap needs an explanation. Ask three questions: Were there too few trials? Does the model rest on a wrong assumption, such as equally likely outcomes, or contain a slip? Were the trials run differently from what the model describes?
Worked example
A model that fits
A spinner has equal sections labelled A, B, C, D and E. You spin it times and record these observed frequencies: A , B , C , D , E . Does a model that gives every letter the same probability agree with the data?
Write the model. The 5 sections are equal in size, so the 5 outcomes are equally likely. Only then can you find a probability as favourable over total: the number of outcomes that give the result, divided by the number of all outcomes. Each letter is 1 section out of 5.
Check the model before you use it. Each probability is between 0 and 1, and the five probabilities add to 1, so every outcome is accounted for.
Find the expected count for each letter. Multiply its probability by the 500 spins, because the model predicts that share of the trials. The result is an approximate prediction, not a guarantee.
Compare counts. Subtract the expected count from each observed frequency. A positive gap means the letter came up more often than predicted, and a negative gap means less often.
Compare rates for the two letters farthest from 100. Divide each observed frequency by 500. The other three relative frequencies lie between these two, so all five are close to 0.2.
Decide. There are many trials, and the largest gap is 8 spins against an expected count of 100. Gaps this small are what chance variation looks like, so nothing here needs explaining.
Answer
Yes. Over spins every relative frequency is within of the model's , so the model with equal probabilities agrees well with the data.
Now suppose a model and the data are far apart. Do not throw the model away yet. At this level there is no exact cut-off for close, so you judge it from two things: how big the gap is compared with the expected count, and how many trials stand behind the data.
A large gap does not tell you by itself what went wrong. It has several possible sources, and your job is to find the one that fits the evidence. The table lists the main ones.
| Possible source | What you might see | What to do next |
|---|---|---|
Too few trials | heads in flips of a coin: a relative frequency of against a model probability of | Run many more trials before you judge the model |
Outcomes that are not equally likely | The model gives every outcome the same probability, but over many trials one outcome happens far more often | List the sample space again, or build the model from the observed frequencies |
A slip in the model | The probabilities do not add to , or an outcome is missing from the list | Correct the model, then compare again |
Trials that do not match the model | The model has each tile put back and mixed in, but some tiles were kept out of the bag | Run the trials as the model describes, or change the model to match the trials |
Worked example
A gap that points to the model
One trial is a flip of two fair coins, Coin 1 and Coin 2. In trials the results are: two heads times, one head and one tail times, two tails times. A student's model gives each of these three results a probability of . Compare the model with the data and explain any gap.
Find the student's expected count. Every result has the same probability in this model, so multiply one third by the 400 trials. The answer is not a whole number, which is fine for a prediction.
Compare counts by subtracting the expected count from each observed frequency. One head and one tail is about 74 over, and the other two results are about 37 and 36 under. Over 400 trials, gaps this large are very unlikely to be chance alone, so test the model's assumption.
The student used favourable over total, which needs equally likely outcomes. List every ordered outcome, Coin 1 first and Coin 2 second, with H for heads and T for tails. Each coin is fair and neither coin affects the other, so these 4 ordered outcomes are equally likely.
Count the ordered outcomes for each result. Two heads is 1 of the 4 outcomes, and so is two tails. One head and one tail is 2 of the 4, (H, T) and (T, H), so it is twice as likely as two heads. The three results are not equally likely. That is the error.
Check the corrected model: its probabilities add to 1. Then find the new expected counts by multiplying each probability by the 400 trials.
Compare again. Each observed frequency is now within 7 of its expected count, which is a small gap for 400 trials.
Answer
The student's model disagrees with the data because it treats three results as equally likely when they are not. The corrected model, with probabilities , and , agrees well with the trials.
That example was error analysis: you read a piece of work, found where it went wrong, explained why, and fixed it. Many errors in probability models come from using a rule outside the conditions that make it true, so check those conditions before you trust any model, including your own.
The table lists the checks. In it, stands for any event, which is one outcome or a group of outcomes, and "not " is the event that does not happen. Notice that the student's model passed one check, because three thirds add to , and was still wrong. No single check is enough, so run them all.
| Check | Why, and when it holds | An error to catch |
|---|---|---|
Each probability is from to | means impossible and means certain; nothing is less likely than impossible or more likely than certain | |
The probabilities add to | The model lists every outcome, and exactly one outcome happens on each trial | Probabilities , and , which add to |
On each trial either happens or it does not, never both, so the two probabilities add to | with ; it should be | |
Favourable over total | Only when the outcomes you count are equally likely; if a trial has two parts, count ordered outcomes | Giving three results each just because there are three of them |
The same outcomes on every draw | Only if each item is put back and mixed in; if items are kept out, the outcomes left for later draws change | In a bag of tiles with red, using for red after a red tile is kept out |
Predictions from a model | An expected count is approximate, and a relative frequency is close to the probability only over many trials | Saying exactly green tiles in the next draws |
Worked example
Find and fix the errors
A bag holds red, blue and green tiles of the same size, but the number of each colour is unknown. Sam draws one tile without looking, records its colour, puts it back and mixes the bag. After draws: red , blue , green . Sam writes: (1) because there are colours. (2) . (3) Exactly of the next draws will be green. Judge each line and fix any error.
Build a model from the data, because nothing says the colours are equally likely. Divide each observed frequency by the 200 draws. Each tile goes back before the next draw, so every draw has the same tiles to choose from, and 200 trials is enough for useful estimates.
Check the model. Each value is between 0 and 1, and the three values add to 1.
Line 1 is wrong. Counting 1 colour out of 3 is favourable over total, which needs equally likely colours. Each tile is equally likely, but a colour with more tiles is more likely to be drawn. The data show it too: one third of 200 is about 67, far from the 90 red and 40 green that Sam saw. Use about 0.45.
Line 2 is correct. Not green means red or blue. Subtracting the probability of green from 1 gives the same value as adding the probabilities of red and blue.
Line 3 has the right number but the wrong word. The expected count is 0.2 times 50, but it is an approximate prediction, and 50 draws is a small number of trials. Replace "exactly" with "about".
Answer
Line 1 is wrong: nothing makes the colours equally likely, and the data give . Line 2 is correct. Line 3 should say that about of the next draws are expected to be green, not exactly .
The takeaway. A probability model is a claim, and data test it. Put both in the same form, as rates or as counts, and look at the gaps. Over many trials, a model that fits stays close to the data, and small gaps are ordinary chance variation. When a gap is large, look for its source: too few trials, outcomes that are not equally likely, a slip in the model, or trials that do not match it. Check each rule against its conditions before you trust a model, and treat every expected count as an approximate prediction, never a guarantee.