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 16≈0.167\frac{1}{6} \approx 0.167. Larger samples look more like the population.

Key idea

What samples look like

PopulationWhat a random sample's display looks like
UniformRoughly flat: all values (or all intervals of equal width) about equally common
Bernoulli(p)(p)Two bars, at 0 and 1; the height of the 1 bar ÷ nn estimates pp
Binomial(n,p)(n, p)Bars at 0,1,…,n0, 1, \dots, n, peaked near npnp; symmetric when p=0.5p = 0.5, skewed when pp is near 0 or 1
Normal(μ,σ2)(\mu, \sigma^2)A histogram that is roughly symmetric and bell-shaped, centred near μ\mu, with almost all values within 3σ3\sigma 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 p=0.7p = 0.7 (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 X∼Bin(8,0.5)X \sim \mathrm{Bin}(8, 0.5), such as the number of heads in 8 coin tosses.

Interactive

Compare with the population

This is the population distribution Bin(8,0.5)\mathrm{Bin}(8, 0.5). Its shape matches the simulated sample above. Now set p=0.15p = 0.15: where would most simulated values lie, and which way would the display be skewed?

A sample from a normal distribution: 200 heights simulated from N(170,82)N(170, 8^2), in centimetres.

In the height sample, the classes from 154 cm to 186 cm cover μ±2σ\mu \pm 2\sigma. 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

  • Simple familiar

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.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Two bars at 0 and 1: Bernoulli. Whole numbers with a peak near npnp: binomial.

  2. Flat: uniform. Symmetric bell, almost all within 3σ3\sigma of μ\mu: normal.

  3. 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: σ\sigma 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 [0,1)[0, 1): =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 npnp 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 ÷ nn, 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.

Lesson 3 of 70% read

Save your progress with a free account