edubun
English

Samples and sample size

Five random heights from N(170, 6.28) can give a standard deviation of 3.4 cm; five thousand give a value within a few hundredths of 6.28.

In practice we almost never see a whole population. We see a sample, and the histogram of a sample is only a rough copy of the population's distribution. How rough depends mostly on one number, the sample size n. This unit uses the lab to draw random samples of any size from a known population, so you can see the copy sharpen as n grows.

Small samples are bumpy

Start the lab with the normal population of heights, N(170, 6.28), and a sample of 20. Press New sample a few times. The histogram jumps around from one sample to the next; one time it leans left, the next it has a gap in the middle, and the sample mean x̄ and standard deviation s move too. In one simulated run made for this page (random seed 7), the same population gave x̄ = 167.72 and s = 3.37 for n = 5, x̄ = 171.09 and s = 5.74 for n = 20, and x̄ = 170.16 and s = 6.92 for n = 100. None of these is wrong. They are what random samples of that size do.

Loading

Drag to turn. Scroll or pinch to zoom.

A random sample of 20 heights from N(170, 6.28), drawn as a density histogram with the population curve in red. Press New sample several times, then raise n to 1,000 and 5,000.

Large samples settle down

Raise n to 1,000 and then 5,000. The bars hug the red curve, and x̄ and s stop wandering: in the same run, n = 1,000 gave x̄ = 170.10 and s = 6.11, and n = 5,000 gave 169.84 and 6.29. How far x̄ typically sits from μ shrinks like σ ÷ √n. For σ = 6.28 that is about 2.81 cm for n = 5, 1.40 cm for n = 20, 0.63 cm for n = 100 and 0.20 cm for n = 1,000. To halve the typical error you need four times as many values. The course on probability looks at this square-root law in detail with the sampling distribution of the mean.

The 68-95-99.7 rule needs a normal shape

The panel also reports what share of the sample lies within one, two and three standard deviations of x̄. For the normal population and a large sample these settle near 68%, 95% and 99.7%. Now switch the population. For the uniform population from 0 to 10, σ = 10 ÷ √12 ≈ 2.89 and only about 57.7% of values lie within one σ of the mean, while all of them lie within two. For the right-skewed waiting times with mean 5 minutes, the population shares within 1, 2 and 3 σ are about 86.5%, 95.0% and 98.2%. A large sample copies whatever shape the population has; it does not turn a skewed population into a bell.

A random sample avoids bias only if every member of the population has a fair chance to be picked. A huge sample collected the wrong way, for example only from volunteers who answer an online poll, can be precise and still wrong. Size reduces random wobble, not bias.

Why the vertical axis says density

The sample lab draws each bar with height equal to its relative frequency divided by the class width. That makes the total area of the bars equal to 1, the same as the total area under the population curve, so the bars and the curve can sit on one scale whatever the sample size. A count axis would make the bars for n = 5,000 a thousand times taller than for n = 5 and the comparison with the curve would be lost.

Sample size nNumber of values in the sample
x̄ and sSample mean and sample standard deviation
Typical distance of x̄ from μσ ÷ √n
Four times the dataHalves the typical error
BiasA systematic error that a bigger sample does not fix
  1. σ = 6.28 and n = 100. σ ÷ √n, two decimals?
  2. σ = 6.28 and n = 5. σ ÷ √n, two decimals?
  3. To halve σ ÷ √n, multiply n by?
  4. Uniform from 0 to 10: σ = 10 ÷ √12, two decimals?
  5. Uniform from 0 to 10: percent within one σ of the mean, one decimal?
  6. Waiting times (skewed right) have about 86.5% within 1σ. What does that show?
    • The 68% figure belongs to normal shapes
    • The sample is too small
    • The rule always gives 68%
    • σ is wrong
  7. You draw 5,000 values from a skewed population. The histogram will look...
    • Bell-shaped
    • Skewed like the population
    • Uniform
    • Bimodal
  8. Small samples from the same population give different histograms because...
    • The population changes
    • Random sampling varies
    • The lab is broken
    • Bins are wrong
  9. An online poll gets 100,000 volunteer answers. What is the main risk?
    • Too much random error
    • Bias from who chose to answer
    • The mean is undefined
    • None
  10. As n grows, the sample standard deviation s tends to...
    • Grow without limit
    • Settle near σ
    • Shrink to 0
    • Equal the mean
Key points
  • Sample histograms are rough copies of the population; they steady as n grows.
  • x̄ typically sits about σ ÷ √n from μ; four times the data halves that distance.
  • Large samples copy the population's shape; the 68-95-99.7 rule needs a normal shape, and size does not fix bias.
Sources for this course (7)
  • OpenStax, Introductory Statistics 2e by Barbara Illowsky and Susan Dean (, per the page notice on 2026-10-17): 2.2 frequency tables, relative and cumulative frequency, frequency polygons (calculus final test scores 5, 10, 30, 40, 15; ages of US presidents at inauguration in six classes)
  • the 100 soccer player heights, the 50 students' books, the 25 classmates' weekend video game hours and the 22 New York restaurant staff counts (openstax.org/books/introductory-statistics-2e/pages/2-2-histograms-frequency-polygons-and-time-series-graphs)
  • 6.1 the standard normal distribution, z-scores, the empirical rule, X ~ N(5, 6)
  • heights of Chilean males aged 15 to 18 N(170, 6.28) for 2009 to 2010 and N(172.36, 6.34) for 1984 to 1985, SAT verbal 2012 N(496, 114) with 1,664,479 test takers, Jerome N(16, 4) (openstax.org/books/introductory-statistics-2e/pages/6-1-the-standard-normal-distribution)
  • De Moivre and the normal approximation to coin flips: D. Lane, Online Statistics Education, 7.2 History of the Normal Distribution (stats.libretexts.org, Introductory Statistics (Lane) 7.2)
  • EBSCO Research Starters, "De Moivre Describes the Bell-Shaped Curve" (1733)
  • Quetelet's chest measurements of 5,738 Scottish militiamen (Quetelet 1846, from an 1817 source; Stigler 1986 corrections): R package HistData, ChestSizes and ChestStigler (vincentarelbundock.github.io/Rdatasets/doc/HistData/ChestSizes.html).

Checked: 2026-10-17