Skip to content

Math glossary

Sample

A sample is a smaller part of a population that you actually measure, such as 30 students picked from a school. Samples are used to estimate facts about the whole group. For spread, sample formulas divide by n − 1 instead of n so they do not underestimate.

Sample meaning

A sample is the part of a population that you actually observe. Measuring everyone is often impractical, so you study a manageable group and use what you find to estimate facts about the whole. A doctor tests a few drops of blood, not all of it. A pollster calls a thousand voters, not ten million. A factory inspects a handful of items from each batch.

The numbers calculated from a sample, such as its mean x̄ or standard deviation s, are called statistics. They are estimates of the population's parameters, μ and σ.

Types of samples

MethodHow it worksExample
Simple randomEvery member has an equal chanceDrawing 50 names from a hat of 2,000
SystematicEvery kth member from a listEvery 20th customer through the door
StratifiedSplit into groups, sample eachEqual numbers from each school year
ClusterPick whole groups at randomSurvey every student in 10 randomly chosen schools
ConvenienceWhoever is easy to reachAsking people in one shopping mall
Voluntary responsePeople choose to take partAn online "rate us" poll

The first four are probability samples, and the maths of margins of error applies to them. Convenience and voluntary samples are cheap but often biased, because the people who are easy to reach, or who care enough to answer, may differ from everyone else.

Sample formulas

For a sample of size n:

xˉ=∑xns2=∑(x−xˉ)2n−1\bar{x} = \frac{\sum x}{n} \qquad s^2 = \frac{\sum (x - \bar{x})^2}{n - 1}

Example. Five randomly chosen employees report years of experience: 4, 7, 9, 10, 15.

  • Sample mean x̄ = 45 ÷ 5 = 9
  • Squared deviations sum to 66
  • Sample variance s² = 66 ÷ 4 = 16.5
  • Sample standard deviation s = √16.5 ≈ 4.06

Dividing by n would give 3.63 instead, which tends to understate how spread out the full company is. The sample vs population guide walks through why.

Sample size and margin of error

Bigger random samples give more precise estimates, but with diminishing returns. For a proportion near 50%, the 95% margin of error is roughly 1 ÷ √n:

Sample size nApprox. margin of error
100±10 points
400±5 points
1,000±3.1 points
2,500±2 points

To halve the margin of error you need four times as many people. Surprisingly, the population size hardly matters once it is much larger than the sample, which is why national polls rarely survey more than a few thousand people.

Sampling bias and sampling error

Sampling error is the natural difference between a sample result and the true population value caused by chance. It shrinks as samples grow and is measured by the margin of error.

Sampling bias is a systematic tilt caused by how the sample was picked. It does not shrink with a bigger sample. The famous 1936 Literary Digest poll surveyed over two million people, mostly from car-owner and telephone lists, and wrongly predicted that Alf Landon would beat Franklin Roosevelt. A much smaller but more representative poll got it right.

Common sources of bias include undercoverage (some groups left off the list), non-response (people who refuse to answer differ from those who do) and leading questions.

A worked sampling plan

A school of 1,200 students wants to know how many walk to school. Listing every student and choosing 120 at random gives a simple random sample. If year groups differ a lot, a stratified sample takes 30 students from each of the four years instead, so no year is left out by chance. If 54 of the 120 say they walk, the estimate is 54 ÷ 120 = 45% of the school, with a margin of error of roughly ±9 points.

Sample vs population at a glance

SamplePopulation
SizenN
Meanx̄μ
SDsσ
Variance divisorn − 1N
Exact?EstimateExact (if every value known)

Sampling frame and non-probability samples

A sampling frame is the actual list the sample is drawn from, such as a school roll or a customer database. If the frame leaves people out, for example a phone list that misses households without phones, the sample cannot represent them however carefully it is drawn.

Not every sample is random. Non-probability methods are quicker and cheaper but give no guarantee of representing the population:

  • Convenience sample: whoever is easiest to reach, such as shoppers in one mall.
  • Quota sample: fill set numbers per group (say 50 men and 50 women) without random selection.
  • Snowball sample: participants recruit others, useful for hard-to-reach groups.
  • Purposive (judgement) sample: the researcher picks cases thought to be typical or informative.

Results from these samples are useful for exploring a topic, but margins of error and confidence intervals assume a probability sample.

Common mistakes

  • Treating a convenience sample as representative.
  • Using N instead of n − 1 for sample variance and standard deviation.
  • Assuming a huge sample cannot be biased.
  • Reporting results without the margin of error, which hides how uncertain they are.

Use the standard deviation calculator in sample mode for data like this, and see standard deviation explained for what the spread means.

FAQ

Frequently asked questions

01What is a sample in statistics?

A smaller group chosen from a population and measured in order to learn about the whole population. 1,000 voters phoned for a poll are a sample of all voters.

02What makes a good sample?

It should be representative of the population, usually by being chosen at random, and large enough that chance variation is small.

03Why do sample formulas divide by n − 1?

A sample's values sit closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1, called Bessel's correction, fixes that bias.

04What is sampling bias?

A systematic error caused by the way a sample is chosen, so that some groups are over- or under-represented. An online poll only reaches people who choose to answer it.

05How big should a sample be?

It depends on how precise you need to be. For a yes/no question, about 400 random responses give a margin of error near ±5 points and about 1,000 give roughly ±3 points, at 95% confidence.

06What is a sampling frame?

The list or source a sample is actually selected from, such as a register of students. A good frame includes every member of the population once; gaps in the frame cause coverage bias.

Related terms

Last updated November 9, 2026. See all math terms.