Leave lesson

Probability · Basic probability

1 / 18

Relative frequency & expected outcomes

Estimating a probability from data — relative frequency is frequency divided by the number of trials — why more trials sharpen the estimate, how to test a dice or spinner for bias, and why the expected number is probability times trials.

Probability · Basic probability

Relative frequency & expected outcomes

Estimating a probability from data — relative frequency is frequency divided by the number of trials — why more trials sharpen the estimate, how to test a dice or spinner for bias, and why the expected number is probability times trials.

Why it works

Some probabilities you can work out by pure thought. A fair six-sided dice has six equally likely faces, so P(six)=16P(\text{six}) = \frac{1}{6} — no experiment needed. But now bend the dice, or drop a drawing pin, or ask "what is the probability this bus is late?". There is no symmetry to argue from, so there is nothing to calculate. The only way in is to watch what actually happens.

That is what relative frequency is:

relative frequency=number of times the outcome happenedtotal number of trials.\text{relative frequency} = \frac{\text{number of times the outcome happened}}{\text{total number of trials}}.

Drop a drawing pin 200200 times, see it land point-up 130130 times, and the relative frequency is 130200=0.65\frac{130}{200} = 0.65. Because it is a part over a whole it always lands between 00 and 11, exactly like a probability — and the relative frequencies of all the possible outcomes add to 11, because every trial produced exactly one of them.

Why does measuring tell you anything about probability? Because a probability is a long-run proportion. Saying a coin has P(head)=0.5P(\text{head}) = 0.5 is a claim about what happens when you flip it many, many times: the proportion of heads settles down near 0.50.5. So recording the proportion is not a second-best substitute for the "real" probability — it is a direct measurement of the very thing the probability describes. That is why relative frequency is also called experimental probability, and why it is only ever an estimate: you measured a finite stretch of the long run, not the whole of it.

Why more trials give a better estimate. Short runs are lumpy. Flip a fair coin 1010 times and getting 77 or more heads happens about one time in six — a relative frequency of 0.70.7, nowhere near 0.50.5, out of a perfectly fair coin. Flip the same coin 10001000 times and the number of heads is almost always between 450450 and 550550, so the relative frequency is pinned between 0.450.45 and 0.550.55. Nothing has changed about the coin. What changed is that a run of luck of a given size becomes a smaller and smaller proportion of the total as the total grows: five extra heads is half of ten flips but only a two-hundredth of a thousand. So the wobble shrinks, and the relative frequency closes in on the true probability.1002003004005000.30.40.50.60.7Number of flipsRelative frequency*The running relative frequency of heads for a fair coin, against the flat line 0.50.5. The luck does not go away; it just counts for less and less.*

Testing for bias. That gives you the whole method for deciding whether a dice or a spinner is fair. Work out the fair (theoretical) probability, work out the relative frequency your data actually gives, and compare — but weigh the comparison against the number of trials. Three sixes in 1010 rolls (relative frequency 0.30.3) proves nothing; that gap sits well inside the ordinary lumpiness of a short run. Seventy-two sixes in 300300 rolls (relative frequency 0.240.24, against a fair value of 160.167\frac{1}{6} \approx 0.167) is a different matter: over that many rolls a fair dice would give about 5050 sixes, and 7272 is a long way clear of 5050. Equally, a relative frequency that is not exactly 16\frac{1}{6} is not evidence of bias — you should never expect an exact match.

Expected number == probability ×\times number of trials. If the proportion of successes settles near pp, then in NN trials the count of successes settles near p×Np \times N. That is the entire derivation: a proportion of a total is that fraction times the total. So if P(point-up)=0.65P(\text{point-up}) = 0.65, then in 500500 drops you expect about 0.65×500=3250.65 \times 500 = 325 point-ups.

Two warnings about the word "expected". First, it does not have to be a whole number. The expected number of sixes in 5050 rolls of a fair dice is 50×16=8.3350 \times \frac{1}{6} = 8.33\ldots, and you obviously cannot roll a third of a six. The 8.338.33 is the average over many sets of 5050 rolls, and an average of whole numbers need not itself be whole — in the same way that families average 1.71.7 children. Do not round it unless the question tells you to. Second, it is a prediction, not a promise: you might get 66 sixes this time, or 1212.

The trap, made concrete: never average the probabilities. Ann spins a spinner 5050 times and gets green 1818 times. Ben spins the same spinner 150150 times and gets green 4242 times. Their separate estimates are 1850=0.36\frac{18}{50} = 0.36 and 42150=0.28\frac{42}{150} = 0.28, and it is very tempting to split the difference:

0.36+0.282=0.32.Wrong.\frac{0.36 + 0.28}{2} = 0.32. \quad \text{Wrong.}

Averaging the two fractions treats Ann's 5050 spins as carrying the same weight as Ben's 150150 — it quietly promotes each of her spins to three times the importance of each of his. Go back to the definition instead and pool the raw counts. Between them they spun 50+150=20050 + 150 = 200 times and saw green 18+42=6018 + 42 = 60 times, so the best estimate is

60200=0.3,\frac{60}{200} = 0.3,

and now every one of the 200200 spins counts exactly once. It is also the more trustworthy estimate for the reason above: it rests on 200200 trials rather than 5050 or 150150. (Averaging happens to give the right answer only when the two sets of trials are the same size — which is exactly when it saves you nothing.)