Resources For Teachers For Tutors For Students & Parents Pricing
Year 11 Maths - Specialist (Unit 1 and Unit 2) Simulation, sampling and sampling distributions

Simulation and random sampling

20 practice questions 0 video lessons Theory + worked examples

Master simulation and random sampling in Year 11 VCE Specialist Mathematics. A simulation imitates a random experiment using random digits, so an event's probability can be estimated without running the real experiment, and the relative frequency \(\dfrac{\text{successes}}{\text{trials}}\) settles toward the true probability as the number of trials grows. It sits in the Data analysis, probability and statistics area of study of the VCE Mathematics Study Design (VCAA), within the Simulation, sampling and sampling distributions topic of Unit 2.

You will learn to describe the event space, assign a range of random digits to model an event of a given probability (for example digits \(0,1,2\) model \(p=0.3\)), read a table of random digits to generate a random sample, and use the relative frequency as an estimate of a probability — building the intuition for sampling distributions and statistical inference that follows.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A simulation imitates a random experiment using random digits, so an event’s probability can be estimated without running the real experiment. In Year 11 Specialist Mathematics you describe the event space, assign a range of random digits to model an event of a given probability (for example digits \(0,1,2\) model \(p=0.3\)), read a table of random digits to generate a random sample, and use the relative frequency \(\dfrac{\text{successes}}{\text{trials}}\) as an estimate of the probability — an estimate that approaches the true value as the number of trials grows.

A random experiment is a process whose outcome cannot be predicted in advance, such as tossing a coin or rolling a die. Each possible result is an outcome, and the set of all outcomes is the event space (or sample space). An event is a collection of outcomes we are interested in — for example “a train is delayed.” The probability \(p\) of an event is the long-run proportion of trials in which it happens.

A simulation models a random experiment using an easy source of randomness, usually a table of random digits \(0\)–\(9\) (each digit equally likely). To model an event of probability \(p\), assign a range of digits so that the share of digits matches \(p\). Since single digits split the possibilities into tenths, an event with \(p=0.3\) is modelled by assigning \(3\) of the ten digits — say \(0,1,2\) — to the event and the remaining \(3\)–\(9\) to “not the event.”

Reading down a fixed string of random digits (from a table or generated by technology) gives a random sample: each digit is one trial, classified as a “success” if it falls in the assigned range. Counting the successes and dividing by the number of trials gives the relative frequency \(\dfrac{\text{successes}}{\text{trials}}\).

The relative frequency is an estimate of the true probability, not its exact value. Because outcomes vary from sample to sample, a short simulation can give a relative frequency some way from \(p\); but as the number of trials grows large, the relative frequency settles toward the true probability. A simulation is fair when the assigned share of digits equals the probability being modelled and every digit is used exactly once.

Assigning three of the ten digits to model a probability of 0.3 The digits 0 to 9 are shown in a row. The digits 0, 1 and 2 are shaded to represent the event, and the digits 3 to 9 are unshaded. Three of the ten digits are assigned to the event, so the modelled probability is three tenths, which is 0.3. digits 0, 1, 2 = event → p = 3/10 = 0.3 0 1 2 3 4 5 6 7 8 9 event (3 digits) not the event (7 digits)
To model \(p=0.3\) with single random digits, assign \(3\) of the ten digits to the event (here \(0,1,2\)) and the other \(7\) to “not the event,” so the assigned share \(\tfrac{3}{10}=0.3\) matches the probability.
Relative frequency settling toward the true probability as trials increase A jagged line shows the relative frequency of an event after each of a growing number of trials. The line swings widely for a small number of trials but the swings shrink as the number of trials increases, settling toward a dashed horizontal line at the true probability 0.3. The relative frequency is an estimate that approaches the true probability as the number of trials grows. p = 0.3 0.3 0.6 number of trials → rel. freq.
The relative frequency swings widely at first but its swings shrink as the number of trials grows, settling toward the true probability \(p=0.3\). A short simulation only estimates \(p\); more trials give a closer estimate.

To model an event of probability \(p\) with single random digits \(0\)–\(9\), the number of digits assigned to the event is:

\[ \text{assigned digits} = p \times 10 \]
assigned=p×10

With two-digit random numbers \(00\)–\(99\) (a share in hundredths), the number assigned is \(p\times 100\) — useful when \(p\) is not a whole number of tenths.

After running the simulation, the relative frequency is the fraction of trials that were a success — the estimate of the probability:

\[ \text{relative frequency} = \dfrac{\text{successes}}{\text{trials}} \]
rel.freq.=successestrials

The expected number of successes in \(n\) trials of an event with probability \(p\) is:

\[ \text{expected count} = p \times n \]
expected=p×n
An estimate, not the exact value. The relative frequency approaches the true probability \(p\) as the number of trials grows — it need not equal \(p\) for a small sample. Single digits can only model probabilities that are a whole number of tenths; for a probability like \(\tfrac13=0.333\ldots\) no whole number of digits gives \(p\) exactly, so a different device (e.g. a die, or two-digit numbers) is needed.

Designing and running a fair simulation

  1. Identify the event and its probability \(p\). Describe the random experiment and the event you want to estimate.
  2. Choose a random device. Single random digits \(0\)–\(9\) model probabilities in tenths; two-digit numbers \(00\)–\(99\) model hundredths.
  3. Assign a range of digits so the assigned share equals \(p\): for \(p=0.3\) assign \(3\) digits (e.g. \(0,1,2\)) to the event and the rest to “not the event.” The ranges must not overlap and must use every digit once.
  4. Generate the sample. Read a fixed string of random digits (or use technology), one digit per trial, and classify each as a success or a failure.
  5. Estimate the probability with the relative frequency \(\dfrac{\text{successes}}{\text{trials}}\).
  6. Use more trials for a better estimate. The relative frequency settles toward the true probability as the number of trials grows.

As the number of trials increases, the relative-frequency estimate of an event with probability \(p=0.3\) settles toward \(0.3\):

Trials \(n\)SuccessesRelative frequency
\(10\)\(4\)\(0.40\)
\(20\)\(7\)\(0.35\)
\(50\)\(16\)\(0.32\)
\(100\)\(31\)\(0.31\)
\(500\)\(152\)\(0.304\)
\(1000\)\(301\)\(0.301\)
Example 1 — Assign digits to a probability
An event has probability \(p = 0.3\). Using single random digits \(0\)–\(9\), how many digits should be assigned to the event, and give a suitable assignment.
Solution

Match the share of the ten digits to the probability:

\(p\)\(=\)\(\dfrac{\text{assigned digits}}{10}\)
\(0.3\)\(=\)\(\dfrac{\text{assigned digits}}{10}\)
\(\text{assigned digits}\)\(=\)\(0.3 \times 10\)
\(=\)\(3\)

Assign \(3\) of the ten digits to the event — for example \(0,1,2\) = event and \(3\)–\(9\) = not the event.

Example 2 — Run the simulation, then estimate
To simulate whether a train is delayed \((p=0.3)\), the digits \(0,1,2\) are assigned to “delayed” and \(3\)–\(9\) to “on time.” The following \(20\) random digits give one day each: \[3\,9\,1\,0\,7\,2\,8\,4\,1\,6\,5\,0\,9\,2\,7\,3\,8\,1\,4\,6\] Find the relative frequency of a delay, and say how it relates to \\(p=0.3\\).
Solution

Count the “delayed” digits \((0,1,2)\) in the string:

\(\text{delayed digits}\)\(=\)\(\{0,1,2\}\)
\(\text{count in the } 20 \text{ digits}\)\(=\)\(7\)

Relative frequency \(=\dfrac{\text{delays}}{\text{trials}}\):

\(\text{relative frequency}\)\(=\)\(\dfrac{7}{20}\)
\(=\)\(0.35\)

The relative frequency is \(0.35\). It is an estimate of the true probability \(0.3\); with more trials it would tend to get closer to \(0.3\).

Relative frequency settling toward the true probability as trials increase A jagged line shows the relative frequency of an event after each of a growing number of trials. The line swings widely for a small number of trials but the swings shrink as the number of trials increases, settling toward a dashed horizontal line at the true probability 0.3. The relative frequency is an estimate that approaches the true probability as the number of trials grows. p = 0.3 0.3 0.6 number of trials → rel. freq.
Example 3 — Two-digit numbers for a probability in hundredths
A factory’s items are faulty with probability \(0.35\). Two-digit numbers \(00\)–\(34\) are assigned to “faulty” and \(35\)–\(99\) to “good.” Ten items are simulated with these numbers: \[07\;52\;88\;13\;41\;60\;29\;74\;05\;36\] Find the relative frequency of a faulty item.
Solution

The assigned share \(\dfrac{35}{100}=0.35\) matches \(p\). Count the “faulty” numbers \((00\)–\(34)\):

\(\text{faulty numbers}\)\(=\)\(\{07,\,13,\,29,\,05\}\)
\(\text{count}\)\(=\)\(4\)

Relative frequency of a faulty item:

\(\text{relative frequency}\)\(=\)\(\dfrac{4}{10}\)
\(=\)\(0.4\)

The relative frequency is \(0.4\) — an estimate of the true probability \(0.35\) from this small sample.

Example 4 — Expected count and variation
A spinner lands on red with probability \(0.4\). It is used for \(25\) spins. Find the expected number of reds, and if one simulation of \(25\) spins gives \(8\) reds, find the relative frequency and explain the difference.
Solution

Expected number of reds \(=p\times n\):

\(\text{expected}\)\(=\)\(0.4 \times 25\)
\(=\)\(10\)

Relative frequency of red for the observed run of \(8\):

\(\text{relative frequency}\)\(=\)\(\dfrac{8}{25}\)
\(=\)\(0.32\)

Expected \(10\) reds; the observed \(8\) gives a relative frequency of \(0.32\). The gap is ordinary sampling variation — more spins would tend to bring the relative frequency closer to \(0.4\).

Common pitfalls

Assigning the wrong number of digits. For \(p=0.3\) assign three digits, not “digit \(0.3\)” or \(3\) tenths of one digit. The count of assigned digits is \(p\times 10\); the assigned ranges must not overlap and must cover all ten digits.
Treating the relative frequency as the exact probability. A relative frequency such as \(0.35\) is an estimate of the probability, found from a sample. It need not equal the true \(p\); a different string of digits would usually give a different estimate.
Using single digits for a probability that is not a whole number of tenths. A probability like \(\tfrac13=0.333\ldots\) cannot be modelled exactly by whole digits, since \(\tfrac13\times 10\) is not a whole number. Use a die \((2\) of \(6\) faces\()\) or two-digit numbers instead.
Expecting the observed count to equal the expected count. The expected count \(p\times n\) is a long-run average, not a guarantee. Observing \(8\) reds when \(10\) are expected is ordinary variation, not an error — more trials narrow the gap.

Frequently asked questions

What is a simulation in probability?

It is a way of imitating a random experiment using an easy source of randomness — usually random digits \(0\)–\(9\) — so that an event’s probability can be estimated without running the real experiment. Each random digit stands for one trial.

How do I assign random digits to model a probability?

Choose a range of digits whose share equals the probability. For single digits the number to assign is \(p\times 10\), so \(p=0.3\) means assigning \(3\) digits (say \(0,1,2\)) to the event and \(3\)–\(9\) to “not the event.” The ranges must not overlap and must use every digit.

What is relative frequency and how does it relate to probability?

The relative frequency is \(\dfrac{\text{successes}}{\text{trials}}\) from the simulation. It is an estimate of the true probability. As the number of trials grows large, the relative frequency settles toward the true probability.

Why isn’t the relative frequency exactly equal to the probability?

Because outcomes vary from sample to sample. A short simulation can give a relative frequency some way from \(p\); this is sampling variation, not a mistake. Increasing the number of trials makes the estimate more reliable and closer to \(p\).

How do I use two-digit random numbers?

Two-digit numbers \(00\)–\(99\) split the possibilities into hundredths, so assign \(p\times 100\) of them to the event. This models probabilities that are not a whole number of tenths, such as \(p=0.35\) by assigning \(00\)–\(34\).

What makes a simulation fair?

A simulation is fair when the assigned share of digits exactly equals the probability being modelled, every digit is used once, and the ranges do not overlap. Then each simulated trial has the same probability as the real event.