Lesson 3 of 7 · 15 min
Displays of real and simulated samples
Recognise what random samples from uniform, Bernoulli, binomial and normal distributions look like, generate them with technology, and use their displays to estimate population features.
What you will be able to do
- Recognise the shape of a sample from a uniform, Bernoulli, binomial or normal distribution.
- Explain why small samples look ragged and large samples resemble the population.
- Generate simulated samples with a calculator or spreadsheet and read estimates from their displays.
A random sample is a small picture of its population. If you could see enough of these pictures, you would recognise the population from them — the flat shape of a uniform distribution, the bell of a normal one. The catch is that every sample is a little different, and small samples are very noisy pictures.
A sample from a uniform distribution: 60 simulated rolls of a fair die. The bars scatter around the expected count of 10 per face.
With only 60 rolls, the counts range from 7 to 13 even though every face is equally likely. When the same simulation is run for 6000 rolls, the relative frequencies are 0.169, 0.164, 0.167, 0.166, 0.170 and 0.164: all very close to . Larger samples look more like the population.
Key idea
What samples look like
| Population | What a random sample's display looks like |
|---|---|
| Uniform | Roughly flat: all values (or all intervals of equal width) about equally common |
| Bernoulli | Two bars, at 0 and 1; the height of the 1 bar ÷ estimates |
| Binomial | Bars at , peaked near ; symmetric when , skewed when is near 0 or 1 |
| Normal | A histogram that is roughly symmetric and bell-shaped, centred near , with almost all values within of it |
Small samples are ragged versions of these shapes. As the sample grows, the display settles towards the population's shape.
A sample from a Bernoulli distribution: 50 simulated free throws by a player with (0 = miss, 1 = make).
From the free-throw sample above, what is the proportion of makes in the sample?
A sample from a binomial distribution: 200 simulated values of , such as the number of heads in 8 coin tosses.
This is the population distribution . Its shape matches the simulated sample above. Now set : where would most simulated values lie, and which way would the display be skewed?
A sample from a normal distribution: 200 heights simulated from , in centimetres.
In the height sample, the classes from 154 cm to 186 cm cover . Use the histogram to find the proportion of the 200 simulated heights in that range, then compare it with the 95 % you would expect from the normal model.
Worked example
Match simulated samples to their distributions
A spreadsheet generated four samples of 300 values each, using =RAND()*10, =IF(RAND() < 0.25, 1, 0), =BINOM.INV(12, 0.25, RAND()) and =NORM.INV(RAND(), 5, 1.5), though not in that order. Their displays are described below.
- Sample A: a histogram, roughly symmetric and bell-shaped, centred near 5, with almost all values between 0.5 and 9.5.
- Sample B: a bar chart with bars at the whole numbers 0 to 8 only, highest at 3, with a longer tail to the right.
- Sample C: a histogram of values between 0 and 10 with all ten classes of width 1 holding roughly 30 values each.
- Sample D: a bar chart with two bars, at 0 (height 228) and 1 (height 72).
(a) Match each sample to its distribution.
(b) Use Sample D to estimate the probability used to generate it.
Step 1: Look for the two-valued display
Only a Bernoulli variable takes just the values 0 and 1. D came from
=IF(RAND() < 0.25, 1, 0), a Bernoulli variable.Step 2: Look for whole numbers with a peak
Whole-number values with a peak near and a right skew (because ) fit B to .
Step 3: Look for a flat shape
=RAND()*10is uniform on , so every class of width 1 should hold about values: C.Step 4: Look for a bell
A is bell-shaped around 5, and is to : the normal .
Step 5: Estimate p from the Bernoulli sample
The proportion of 1s in D is , which estimates the true probability .
Try it yourself first, then check the working one step at a time.
Answer
A is normal, B is binomial, C is uniform and D is Bernoulli. From D, , close to the true .
Method
Two bars at 0 and 1: Bernoulli. Whole numbers with a peak near : binomial.
Flat: uniform. Symmetric bell, almost all within of : normal.
Estimate a proportion from a display as (frequency of interest) ÷ (sample size).
Watch out for
Expecting a sample from a uniform distribution to have exactly equal bars.
Confusing the binomial (bars at many whole numbers) with the Bernoulli (only 0 and 1).
Simulating on a calculator
- Uniform integers:
RanInt#(1, 6)(Casio),randInt(1, 6)(TI). - Binomial:
RanBin#(8, 0.5)(Casio),randBin(8, 0.5)(TI). - Normal:
RanNorm#(8, 170)(Casio: first),randNorm(170, 8)(TI).
Add a number of values as a third argument to generate a whole list, then graph it as a histogram.
Simulating in a spreadsheet
- Uniform on :
=RAND(). - Uniform integers:
=RANDBETWEEN(1, 6). - Bernoulli:
=IF(RAND() < 0.7, 1, 0). - Binomial:
=BINOM.INV(8, 0.5, RAND()). - Normal:
=NORM.INV(RAND(), 170, 8).
Fill down for as many values as you need.
Common mistake
Expecting a sample to match exactly
A sample from a uniform distribution won't have perfectly equal bars, and a sample from a normal distribution won't be perfectly symmetric. Judge the overall shape, not small bumps — especially when the sample is small.
Note
Real data behave the same way
Real random samples — the heights of 200 randomly chosen adults, or the free throws a player actually takes — look just like these simulated ones, as long as the model fits. Comparing a real sample's display with simulated samples from a model is a good way to judge whether the model is reasonable.
Summary
A random sample's display resembles its population: flat for uniform, two bars for Bernoulli, peaked near for binomial, bell-shaped for normal.
Small samples are ragged; larger samples settle towards the population shape.
Proportions read from a sample display, such as the height of the 1 bar ÷ , estimate the population values.
Calculators (
RanInt#,RanBin#,RanNorm#) and spreadsheets (RAND,BINOM.INV,NORM.INV) generate simulated samples.
Finished the lesson?
Try the 2 quick checks above and the lesson completes itself, or mark it complete now.