Relative frequency and simulations
Estimating probability from data with relative frequency, why more trials give a better estimate, comparing experimental and theoretical probability, and designing simple simulations with coins, dice and spreadsheets.
Counting equally likely outcomes only works when the outcomes really are equally likely. What is the chance a drawing pin lands point up? A drawing pin isn't symmetrical, so there is nothing to count. What is the chance your bus is late, or that a new phone is faulty? For questions like these, the only honest way to get a probability is to collect data. That data-based estimate is called relative frequency.
Relative frequency
Relative frequency is the fraction of trials in which the event happened. If you use it as a probability, it is called an experimental or empirical probability. A probability from counting equally likely outcomes is called a theoretical probability.
A drawing pin is dropped 250 times and lands point up 158 times. Estimate the probability that it lands point up next time.
A quality-control team tests 1200 phone chargers from a factory and finds 18 faulty. Estimate the probability that a charger is faulty, and the number of faulty chargers in a shipment of 50{,}000.
Why more trials are better
Toss a coin 10 times and getting 7 heads isn't surprising. Toss it 10{,}000 times and getting $70\%$ heads would be very strange. With only a few trials, one lucky or unlucky result shifts the relative frequency a lot. With many trials, each new result barely moves it, so the relative frequency settles down close to the true probability. This is sometimes called the law of large numbers.
Choose an object. Its true chance is hidden. Make a guess, then add trials in small and big batches and watch the orange line.
After 10 trials, write down the relative frequency. Then run 1000. How far apart are your two estimates? Press Reset and repeat. Is the 10-trial estimate the same each time? Is the 1000-trial one? Only reveal the true chance at the end.
Simulations
A simulation uses something simple and random, such as a coin, a die or a random number generator, to stand in for a real situation. Running it many times gives a relative frequency you can use as an estimate. It is handy when the real experiment is slow, expensive or hard to calculate.
To design one, match each real outcome to an outcome of your simulator with the same probability. A coin can model anything with chance $\frac{1}{2}$. A die can model chance $\frac{1}{6}$, or $\frac{1}{3}$ using two faces. In a spreadsheet, =RANDBETWEEN(1,6) rolls a virtual die, and =RAND() gives a random decimal from 0 to 1, so =IF(RAND()<0.3,"Rain","Dry") simulates a day with a $30\%$ chance of rain.
A student guesses every answer on a 5-question true/false quiz. To estimate the chance of getting at least 3 right, a class tosses 5 coins (head = correct) and records the number of heads. They do this 40 times.
| Number correct | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Frequency | 1 | 6 | 12 | 13 | 6 | 2 |
Your turn
Over one term, a student notes that 342 of 600 bus trips to school in Blacktown arrived within 5 minutes of the timetable. Estimate the probability that a trip is on time, and how many of the 1500 trips next year should be on time.
Show the answer
$\frac{342}{600} = 0.57$. Next year, expect about $1500 \times 0.57 = 855$ on-time trips, assuming the service doesn't change.
A survey of 120 Year 12 students found 27 catch the train to school. Find the relative frequency of catching the train.
$\frac{27}{120} = 0.225$.
Using the survey above, estimate how many of the 2000 students at a large college catch the train.
$2000 \times 0.225 = 450$ students.
A spinner is spun 20 times and lands on red 9 times. Then it is spun 2000 times and lands on red 668 times. Which is the better estimate of $P(\text{red})$?
With 2000 trials, chance variation has much less effect, so $\frac{668}{2000} = 0.334$ is far more reliable than $\frac{9}{20} = 0.45$.
A fair coin is tossed 10 times and lands heads 7 times. Which statement is correct?
Relative frequency is $\frac{7}{10} = 0.7$. Ten tosses are too few to show bias, so the theoretical probability of a fair coin stays at $0.5$. Coins have no memory, so tails isn't "due".
Which of these could be used to simulate an event with probability $\frac{1}{3}$?
A die shows 1 or 2 with probability $\frac{2}{6} = \frac{1}{3}$. A head is $\frac{1}{2}$, a 6 is $\frac{1}{6}$ and a red card is $\frac{1}{2}$.
Of 400 people who bought a raffle ticket at a footy club last season, 132 also bought a meat tray ticket. Find the relative frequency, as a decimal.
$\frac{132}{400} = 0.33$.
In a spreadsheet, which formula simulates an event that happens with probability $0.3$?
RAND()gives a random decimal from 0 to 1, and it lands below $0.3$ exactly $30\%$ of the time. The version with "greater than" gives "Yes" $70\%$ of the time.A factory tested 400 light globes and 6 were faulty. Estimate how many globes would be faulty in a batch of 12{,}000.
Relative frequency $= \frac{6}{400} = 0.015$. Expected faulty $= 12{,}000 \times 0.015 = 180$.
Exam style: Ella rolls a die 30 times and gets six 4s. She says, "The probability of a 4 is $\frac{6}{30} = \frac{1}{5}$, not $\frac{1}{6}$, so the die is unfair." Which is the best response?
Expected 4s in 30 rolls $= 30 \times \frac{1}{6} = 5$. Getting 6 instead of 5 is normal chance variation for such a small number of trials. To test the die properly she needs hundreds of rolls.
Exam style: A netballer's shooting record shows 84 goals from 140 attempts. Find, as a decimal, the relative frequency of a missed shot.
Misses $= 140 - 84 = 56$. Relative frequency $= \frac{56}{140} = 0.4$. Or use the complement: $1 - \frac{84}{140} = 1 - 0.6 = 0.4$.
Coaching Centre