Experimental probability and relative frequency
A thumbtack can land point up or point down, and nothing about its shape says how often each happens. How do you put a number on that chance?
Where you are 14 in Basic probability
When you reach for it
Some chances can be counted. A fair cube has six faces that nobody can tell apart once it is rolling, so each face gets \displaystyle \frac{1}{6}, and the probability of an event is the number of outcomes in it over the number of outcomes in all. That count needs a model whose outcomes are equally likely, or at least have known chances (see Probability models: equally likely or not).
Many chance processes have no such model. A tossed thumbtack lands either point up (resting on its flat head) or point down (tipped over, with the point touching the table). Two outcomes, no reason to think them equally likely, and nothing about the tack says how often each happens. The same goes for a dropped paper cup, the next bird at a feeder, or a player’s next free throw. There is nothing to count, so the chance has to be learned from what actually happens.
That is when you reach for this skill: repeat the process many times, count, and use the share of times something happened as an estimate of its probability. It also runs the other way: a probability says about how many times to expect the event in a given number of further tries.
The procedure
Day 1: relative frequency
Each repetition of the process is a trial: one toss of the tack, one drop of the cup, one bird landing, one cap checked, one free throw. The number of trials in which an event happened is its frequency, and its share of all the trials is its relative frequency:
A relative frequency used as an estimate of a probability is called an experimental probability. A probability worked out by counting outcomes in a model is a theoretical probability. One is measured, the other is reasoned out. When the thumbtack lands point up in about six tosses out of ten, we write P(\text{point up}) \approx 0.6, and the sign \approx is there because a measured number is never exact.
A relative frequency is a fraction, so it can be written three ways. If a tack lands point down in 9 of 20 tosses, its relative frequency is
Dividing the top by the bottom gives the decimal, and multiplying by 100 gives the percent.
Two facts follow straight from the definition. The count can never be below 0 or above the number of trials, so a relative frequency is always between 0 and 1. And when every trial ends in exactly one of the outcomes, the frequencies of all the outcomes add up to the number of trials, so their relative frequencies add up to 1, exactly as the probabilities in a model do.
It settles down as the trials pile up. Saffron tossed one thumbtack 400 times, always from the same height onto the same table, and stopped six times along the way to write down the running total. Each relative frequency uses every toss so far, not just the latest ones.
| Tosses | Point up | Relative frequency |
|---|---|---|
| 10 | 7 | 0.7 |
| 20 | 11 | 0.55 |
| 50 | 31 | 0.62 |
| 100 | 58 | 0.58 |
| 200 | 121 | 0.605 |
| 400 | 238 | 0.595 |
The first values jump about, from 0.7 down to 0.55. The later ones hardly move: 0.605, then 0.595. There is a plain reason. After 10 tosses with 7 point up, the eleventh toss makes the relative frequency either \displaystyle \frac{8}{11} \approx 0.727 or \displaystyle \frac{7}{11} \approx 0.636, a change of several hundredths. After 400 tosses with 238 point up, the next toss makes it either \displaystyle \frac{239}{401} \approx 0.596 or \displaystyle \frac{238}{401} \approx 0.594, a change of about a thousandth. One toss is a large part of 11 tosses and a tiny part of 401. In general, after n trials one more trial can move a relative frequency by at most \displaystyle \frac{1}{n+1}, so the more trials are already in, the less any single new one can do.
Settling does not mean the value stops changing or lands on one exact number. Why it settles near the probability itself is the law of large numbers, which comes next. The working rule here: the relative frequency from the most trials is the best estimate. Saffron’s is P(\text{point up}) \approx 0.6.
When data arrive in batches of different sizes, add the counts and add the trials, then divide once. Averaging the batch relative frequencies would let a batch of 50 count as much as a batch of 200. Example 2 shows the difference.
Day 2: predicting counts from a probability
Suppose an event has probability p and the process will be repeated n times. The relative frequency should come out near p, which says \displaystyle \frac{\text{count}}{n} \approx p. Multiplying both sides by n gives the prediction:
This is finding a percent of a quantity in a new setting: write p as a decimal and multiply. The probability can be theoretical or experimental; the prediction is made the same way, and the predicted relative frequency is p itself.
The word “about” carries weight. Real counts vary from one run of trials to the next, so p \times n is the center the count should land near, not the count itself. It need not even be a whole number: with p = 0.3 and n = 25 the prediction is 0.3 \times 25 = 7.5, which means “about 7 or 8”.
Comparing a theoretical probability with a relative frequency. Data almost never match a probability exactly, so the question is whether a gap is the ordinary bounce of chance or big enough to doubt the model. Judge it by two things: how big the gap is, and how many trials lie behind it.
- A small set of trials bounces around a lot. With 10 trials one result is worth 0.1 of the relative frequency, so a gap of a trial or two is ordinary and says little either way.
- A large set of trials rarely strays far. If the model is right, the relative frequency should have settled close to p, and one trial is worth almost nothing. The same gap is now surprising, and a surprising gap is evidence, though not proof, that the model is wrong.
Between the two lies a gray zone where no clear verdict is possible. The examples and exercises here stay with cases where the size of the gap and the number of trials make the answer clear.
Worked examples
Examples 1 to 3 belong to day 1 and examples 4 to 6 to day 2.
Day 1: three ways a paper cup can land
Vaughan drops a paper cup 80 times from the same height. It lands on its side 52 times, open end down 19 times and open end up 9 times. Find the relative frequency of each outcome as a fraction, a decimal and a percent, and say whether a model with the three outcomes equally likely is reasonable.
SolutionFirst, 52 + 19 + 9 = 80, so every drop was counted once and there are 80 trials. Each relative frequency is the count over 80:
| Outcome | Relative frequency |
|---|---|
| side | \displaystyle \frac{52}{80} = 0.65 = 65\% |
| end down | \displaystyle \frac{19}{80} = 0.2375 = 23.75\% |
| end up | \displaystyle \frac{9}{80} = 0.1125 = 11.25\% |
The first fraction simplifies to \displaystyle \frac{52}{80} = \frac{13}{20}. As a check, 0.65 + 0.2375 + 0.1125 = 1, as it must be when every trial ends in exactly one outcome.
An equally likely model would give each outcome \displaystyle \frac{1}{3} \approx 0.33, so about 27 of the 80 drops each. The side came up 52 times and the open end up only 9 times, gaps of many drops in both directions over a fair number of trials. The equal model does not fit. The data give P(\text{side}) \approx 0.65 instead.
Day 1: pooling a factory’s quality checks
Wilhelmine checks bottle caps from one machine for four days and records how many are faulty.
| Day | Checked | Faulty |
|---|---|---|
| Monday | 50 | 3 |
| Tuesday | 50 | 1 |
| Wednesday | 100 | 4 |
| Thursday | 200 | 7 |
Find each day’s relative frequency of a faulty cap, the running relative frequency after each day, and the best estimate of the probability that a cap from this machine is faulty. Then explain why averaging the four daily percentages gives a different answer.
SolutionEach day on its own: \displaystyle \frac{3}{50} = 0.06, \displaystyle \frac{1}{50} = 0.02, \displaystyle \frac{4}{100} = 0.04 and \displaystyle \frac{7}{200} = 0.035.
The running relative frequency adds the counts and the caps so far:
| After | Faulty | Checked | Running |
|---|---|---|---|
| Mon | 3 | 50 | 0.06 |
| Tue | 4 | 100 | 0.04 |
| Wed | 8 | 200 | 0.04 |
| Thu | 15 | 400 | 0.0375 |
The last row uses all 400 caps, so it is the best estimate: \displaystyle P(\text{faulty}) \approx \frac{15}{400} = 0.0375 = 3.75\%.
Averaging the four daily values gives \displaystyle \frac{0.06 + 0.02 + 0.04 + 0.035}{4} = 0.03875, which is different. The plain average gives Monday’s 50 caps the same say as Thursday’s 200, so each Monday cap counts four times as much as a Thursday cap. Pooling counts every cap once, which is what a relative frequency is meant to do.
Day 1: birds at a feeder
Thelonius records the kind of every bird that lands on his garden feeder over one week: 84 sparrows, 63 finches, 35 blue tits, 14 robins and 4 others. Estimate the probability that the next bird to land is a finch or a robin, and the probability that it is not a sparrow.
SolutionThe trials are the landings: 84 + 63 + 35 + 14 + 4 = 200.
“A finch or a robin” happened in 63 + 14 = 77 landings, so
Adding the two separate relative frequencies, \displaystyle \frac{63}{200} = 0.315 and \displaystyle \frac{14}{200} = 0.07, gives the same 0.385, because no landing is both a finch and a robin.
The relative frequency of a sparrow is \displaystyle \frac{84}{200} = 0.42. “Not a sparrow” is its complement, so its estimate is 1 - 0.42 = 0.58. Counting directly agrees: 200 - 84 = 116 landings were not sparrows, and \displaystyle \frac{116}{200} = 0.58.
These numbers describe this feeder in this week, a point taken up under Boundaries.
Day 2: a season of free throws
Ulyssa made 168 of her 240 free throws last season. Estimate the probability that she makes a free throw. Next season she expects to take about 200. Predict how many she will make and miss. Then say whether “she will make exactly 7 of her next 10” is a fair prediction.
SolutionThe estimate is the relative frequency: \displaystyle \frac{168}{240} = \frac{7}{10} = 0.7.
For 200 shots the expected count is p \times n:
so about 140 made and 200 - 140 = 60 missed.
For 10 shots, 0.7 \times 10 = 7 is the center of what to expect, but “exactly” is too strong. Over 10 shots each one is worth 0.1 of the relative frequency, so 6 or 8 would surprise nobody. The prediction is “about 7”.
Day 2: prizes in cereal boxes
A cereal maker puts one of five different toy prizes in each box and says the five are packed in equal numbers and mixed at random. Yusuf-Ali wants the dinosaur.
(a) What is the probability that a box holds the dinosaur, and what relative frequency should he expect over many boxes? (b) About how many dinosaurs should turn up in 60 boxes? In 72 boxes? (c) About how many boxes would give an expected count of 10 dinosaurs?
Solution(a) Here there is a model: five prizes, equally likely. So the probability is theoretical, \displaystyle P(\text{dinosaur}) = \frac{1}{5} = 0.2, and the relative frequency over many boxes should come out near 0.2.
(b) In 60 boxes, 0.2 \times 60 = 12, so about 12. In 72 boxes, 0.2 \times 72 = 14.4. Nobody finds 14.4 dinosaurs; the prediction means about 14.
(c) The expected count is 0.2 \times n, and it should be 10:
About 50 boxes, and like every prediction here it is a center, not a promise.
Day 2: is the supplier’s claim believable
A bottle cap supplier claims that 2\% of its caps are faulty. Vaughan checks 50 caps and finds 2 faulty. Later the whole delivery of 5{,}000 caps is checked and 200 are faulty. For each check, compare the result with the claim and say whether the difference is surprising.
SolutionThe claim gives p = 0.02.
For the 50 caps, the expected count is 0.02 \times 50 = 1, and the relative frequency is \displaystyle \frac{2}{50} = 0.04, double the claim. But the gap is a single cap. Fifty caps is a small sample, and a small sample bounces around a lot: one cap more or less moves the relative frequency by 0.02, the whole claimed rate. A gap that one cap can make is not surprising, and this check does not contradict the claim.
For the 5{,}000 caps, the expected count is 0.02 \times 5{,}000 = 100, and the relative frequency is \displaystyle \frac{200}{5{,}000} = 0.04: the same as before. Now, though, the gap is 100 caps, and one cap moves the relative frequency by only 0.0002. A sample of 5{,}000 is large, and a large sample rarely strays far from the true rate: if the claim were right, the relative frequency should sit close to 0.02, not at twice that. This is surprising, and strong evidence that the true rate is higher than 2\%, with about 4\% the better estimate.
The two checks had the same relative frequency and opposite verdicts. The number of trials is what made the difference.
Boundaries
The trials have to repeat the same process. A relative frequency estimates the probability for the process that produced the data: that thumbtack, dropped that way; that feeder, in that week; that player, in that season. Change the conditions, such as a different tack, a different season at the feeder, or a player coming back from an injury, and the old estimate need not carry over.
Every trial counts once. Leaving out awkward results, or counting only the birds seen in the morning, gives the relative frequency of something else.
It is an estimate, never the exact probability. A relative frequency from few trials can sit far from the probability. A relative frequency of 0 does not make an event impossible: no faulty caps in 50 checks does not mean the machine never makes one. In the same way, 1 does not make it certain.
A prediction is a center, not a promise. p \times n says roughly where the count should land. The actual count varies, and p \times n need not be a whole number.
The relative frequency settles; the count gap need not shrink. If Saffron had gone on to 2{,}000 tosses with 1{,}190 point up, she would be 10 short of 0.6 \times 2{,}000 = 1{,}200, further off than the 2 she was short after 100 tosses. Yet her relative frequency, 0.595, would be closer to 0.6 than 0.58 was, because 10 in 2{,}000 is a smaller share than 2 in 100. Nothing pushes the counts back into line; the growing number of trials shrinks the share.
Where this goes next
The settling seen in Saffron’s table is made exact by the law of large numbers, which also explains why a run of misses does not make a hit “due”. When real trials are slow or costly, a coin, cube or computer can stand in for them: that is designing a simulation, and estimating a probability from simulated trials uses exactly the relative frequency from this lesson.
Relative frequencies for every outcome make a probability model built from data, and drawn as bars they make a histogram. The prediction p \times n grows into the mean of a binomial and the expected value of a random variable.
Exercises
Day 1: finding a relative frequency
- A thumbtack is tossed 50 times and lands point up 27 times. Find the relative frequency of point up as a fraction, a decimal and a percent, and the relative frequency of point down.
- A paper cup is dropped 120 times and lands on its side 84 times. Write the relative frequency of landing on its side as a fraction in lowest terms, a decimal and a percent.
- A factory checks 1{,}250 bottle caps and finds 15 faulty. Estimate the probability that a cap is faulty, as a decimal and a percent.
- Over one afternoon the birds landing on a feeder were 18 pigeons, 42 starlings, 33 sparrows and 27 blackbirds. Find each relative frequency as a decimal, and estimate the probability that the next bird to land is a pigeon or a blackbird.
Day 1: running relative frequencies
- Yusuf-Ali drops a paper cup and records how many times it has landed on its side so far: 4 after 10 drops, 11 after 20, 33 after 50, 62 after 100 and 127 after 200. Find the running relative frequency at each stop, and give the best estimate of P(\text{side}).
- Wilhelmine shoots free throws in blocks of 25 and makes 14, 19, 17 and 18 in the four blocks. Find the running relative frequency of a make after 25, 50, 75 and 100 shots.
- On one day a factory checks 200 caps and finds 6 faulty; on the next it checks 800 and finds 8 faulty. Find the relative frequency of a faulty cap over both days together. Saffron averages the two daily percentages instead. What does she get, and why is it the wrong estimate?
- After 20 tosses a thumbtack has landed point up 12 times. Find the relative frequency of point up after the twenty-first toss if that toss lands point up, and if it lands point down, each to three decimal places. Do the same after 400 tosses with 240 point up.
- Three people toss the same thumbtack in the same way. One gets 8 point up in 10 tosses, one 22 in 40, and one 148 in 250. Find each relative frequency and the pooled one, and say which is the best estimate of P(\text{point up}).
Day 2: predicting counts
- Using P(\text{point up}) \approx 0.6, about how many times should a thumbtack land point up in 350 tosses? About how many point down?
- A player’s season relative frequency of a made free throw is 0.82. About how many of her next 45 free throws should she make?
- A machine makes faulty caps with probability 1.5\%. About how many faulty caps should a batch of 12{,}000 contain, and about how many good ones?
- At one feeder finches make up a relative frequency of 0.32 of landings. About how many landings would have to be watched to expect about 40 finches?
- A player makes 75\% of her free throws. Thelonius says that she will make exactly 15 of her next 20. Give the better prediction.
Day 2: is the difference surprising?
- A cereal maker says its four prizes are packed in equal numbers. Saffron opens 12 boxes and finds the rocket 5 times. Compare with the expected count and say whether this is surprising.
- For the same cereal, a shop’s record of 2{,}000 boxes shows 900 rockets. Compare with the expected count and say whether this is surprising.
- A supplier claims 1\% of its caps are faulty. A check of 100 caps finds 2 faulty, and a check of 10{,}000 caps finds 104 faulty. For each, find the expected count and the relative frequency, and say whether it is surprising.
- A player who makes 70\% of her free throws over a season makes only 2 of 6 in one game. Her coach says her chance of making a free throw has dropped. Find the expected count for 6 shots and say whether the game is strong evidence for the coach’s claim.
Reasoning
- Explain why, when every trial ends in exactly one outcome, the relative frequencies of all the outcomes add to 1.
- Use your answers to exercise 8 to explain why a running relative frequency moves less and less as trials are added.
- Thelonius says: “My thumbtack landed point up 6 times in 10 tosses, so it will land point up exactly 60 times in the next 100.” Name two things wrong with this.
- Explain why the probability that a thumbtack lands point up cannot be found by counting outcomes, the way the probability of rolling a 5 on a fair cube can.
Answers
- Point up: \displaystyle \frac{27}{50} = 0.54 = 54\%. Point down: 50 - 27 = 23 tosses, so \displaystyle \frac{23}{50} = 0.46 = 46\%. The two add to 1.
- \displaystyle \frac{84}{120} = \frac{7}{10} = 0.7 = 70\%. Dividing top and bottom by 12 gives lowest terms.
- \displaystyle \frac{15}{1{,}250} = \frac{3}{250} = 0.012 = 1.2\%.
- There were 18 + 42 + 33 + 27 = 120 landings. Pigeon \displaystyle \frac{18}{120} = 0.15, starling \displaystyle \frac{42}{120} = 0.35, sparrow \displaystyle \frac{33}{120} = 0.275, blackbird \displaystyle \frac{27}{120} = 0.225; they add to 1. Pigeon or blackbird: \displaystyle \frac{18 + 27}{120} = \frac{45}{120} = 0.375.
- \displaystyle \frac{4}{10} = 0.4, \displaystyle \frac{11}{20} = 0.55, \displaystyle \frac{33}{50} = 0.66, \displaystyle \frac{62}{100} = 0.62, \displaystyle \frac{127}{200} = 0.635. The best estimate uses all 200 drops: P(\text{side}) \approx 0.635.
- Running makes 14, 33, 50, 68. Relative frequencies \displaystyle \frac{14}{25} = 0.56, \displaystyle \frac{33}{50} = 0.66, \displaystyle \frac{50}{75} \approx 0.667 and \displaystyle \frac{68}{100} = 0.68.
- Together: \displaystyle \frac{6 + 8}{200 + 800} = \frac{14}{1{,}000} = 0.014 = 1.4\%. The daily rates are 3\% and 1\%, so Saffron gets 2\%. That treats 200 caps as if they counted as much as 800; pooling counts every cap once.
- After 20 tosses the value is \displaystyle \frac{12}{20} = 0.6. Then \displaystyle \frac{13}{21} \approx 0.619 or \displaystyle \frac{12}{21} \approx 0.571. After 400: \displaystyle \frac{241}{401} \approx 0.601 or \displaystyle \frac{240}{401} \approx 0.599. One toss moves the value by a few hundredths at 20 tosses but only about a thousandth at 400.
- \displaystyle \frac{8}{10} = 0.8, \displaystyle \frac{22}{40} = 0.55, \displaystyle \frac{148}{250} = 0.592. Pooled: \displaystyle \frac{8 + 22 + 148}{10 + 40 + 250} = \frac{178}{300} \approx 0.593. The pooled value uses all 300 tosses, so it is the best estimate.
- 0.6 \times 350 = 210 point up, and about 350 - 210 = 140 point down.
- 0.82 \times 45 = 36.9, so about 37.
- 0.015 \times 12{,}000 = 180 faulty, and about 12{,}000 - 180 = 11{,}820 good.
- 0.32 \times n = 40, so \displaystyle n = \frac{40}{0.32} = 125 landings.
- 0.75 \times 20 = 15, so “about 15” is right but “exactly” is not: in only 20 shots the count varies, and 14 or 16 would be just as ordinary.
- Expected \displaystyle \frac{1}{4} \times 12 = 3; she got 5, a relative frequency of \displaystyle \frac{5}{12} \approx 0.42 against 0.25. Not surprising: with 12 boxes each box is worth about 0.08, and a gap of 2 boxes is ordinary in so small a sample.
- Expected \displaystyle \frac{1}{4} \times 2{,}000 = 500; the record shows 900, a relative frequency of 0.45. Surprising: over 2{,}000 boxes the relative frequency should have settled near 0.25, and a gap of 400 boxes says the prizes are probably not packed in equal numbers.
- For 100 caps: expected 0.01 \times 100 = 1, relative frequency 0.02; a gap of one cap, not surprising. For 10{,}000 caps: expected 0.01 \times 10{,}000 = 100, relative frequency \displaystyle \frac{104}{10{,}000} = 0.0104, very close to 0.01; not surprising either. Both checks fit the claim.
- Expected 0.7 \times 6 = 4.2, about 4; she made 2, a relative frequency of about 0.33. Not strong evidence: in a sample of six each shot is worth about 0.17 of the relative frequency, so a gap of about two shots can come from chance alone. Six shots give weak evidence either way; only many more shots could show whether her chance has changed.
- Each trial is counted under exactly one outcome, so the counts add to the number of trials, n. Dividing every count by n divides their sum by n too, and \displaystyle \frac{n}{n} = 1.
- The new trial changes the count by 0 or 1 while the number of trials grows by 1. After 20 trials that is a noticeable share, a few hundredths; after 400 it is about a thousandth. The more trials already counted, the smaller the share one more can change.
- Ten tosses are too few for a trustworthy estimate, since each toss is worth 0.1 of the relative frequency. And even with a good estimate, 0.6 \times 100 = 60 is only the center of the prediction: the count should be about 60, not exactly 60.
- Counting needs a model in which the outcomes are equally likely, or have known chances. A fair cube’s six faces are alike, so each gets \displaystyle \frac{1}{6}. A thumbtack’s two ways of landing are not alike and nothing about its shape gives their chances, so they can only be estimated from data.