TL;DR
A random sample is a subset of a population chosen by a chance mechanism, where every member has a known probability of being picked. Because the chance is built into the selection, you can calculate how far the sample's average or proportion is likely to be from the true population value. That error shrinks as the sample gets larger.
Without randomness, the sample can still be informative, but you cannot say how wrong it might be.
Where you'll see it: opinion polls, quality checks on a factory batch, clinical trials that randomly assign participants to groups, and the census-style surveys that governments use to measure unemployment.
Intuition
Suppose you want to know the average height of students in a school of 2000 people. Measuring the students in the front row of the gym is quick, but it is a bad plan. Front-row students may be sorted by age or by sport, so the average you get describes the front row, not the school.
Random sampling fixes this by taking the choice out of your hands. Write every student's name on a slip, mix them well, and draw 100. Any particular student might be drawn or might not, and you cannot control which. But over many possible draws, the drawn group has no systematic lean towards tall or short students, and the chance of each student being picked is the same. The sample is a fair window onto the whole school.
The key idea is that the randomness belongs to the selection procedure, not to the outcome. You do not need the sample to be random in its composition, because it will almost never match the population exactly. You need the procedure that produced it to be one whose behaviour you understand. That understanding is what lets you say "the answer is probably within about two points of the truth" rather than just "here is a number".
The reason larger samples help has the same root as the Law of Large Numbers: each draw adds information, and the errors from different draws partly cancel. A sample of 1000 people does not just give a better answer than a sample of 100. It gives an answer whose typical error is about times smaller.
flowchart LR P[Population of N members] --> S[Chance mechanism picks n members] S --> D[Measure the sample] D --> E[Estimate with known error] P -. unknown truth .-> E
The math
Let the population have members, each with a value . The population mean is . We want to estimate from a sample of members.
A simple random sample of size is a subset of distinct members chosen so that every subset of size is equally likely. Each member has the same probability of being included.
The sample mean is , where are the values of the members drawn. Because each drawn value is equally likely to be any of the population values, its expected value is the population mean:
Therefore . A sample mean from a simple random sample is unbiased: averaged over all possible samples, it hits the true value exactly.
The spread of the estimate
Unbiasedness says nothing about how far one sample might miss. For that we need the variance. Drawing without replacement, which is what happens when you do not pick the same member twice, gives a slightly smaller variance than drawing with replacement. Let be the population variance. Then
When is much larger than , the factor is close to 1, and the standard error is
The standard error falls with the square root of . To halve it, you need four times as many people.
Proportions
For a yes-or-no question, let be the true proportion of "yes" answers. The standard error of the sample proportion is
The product is largest at , so is the safe value to use when you have no idea what is.
Worked examples
Example 1: a tiny population, every sample listed
Take a population of five values: , so and . Draw a simple random sample of size without replacement.
- The number of possible samples is , and each is equally likely, with probability .
- List the ten pairs and their means: , , , , , , , , , .
- Sum the ten sample means: .
- Average over the ten equally likely samples: .
- This equals the population mean .
Interpretation: no single pair is right, since the means range from 3 to 9. But the average over all possible pairs is exactly the truth. That is what unbiased means.
Example 2: a poll of 1000 people
A simple random sample of adults is asked a yes-or-no question. The true proportion is unknown, so use as the worst case.
- Standard error of the proportion: .
- Convert to percentage points: about 1.6 points.
- The 95 percent margin of error is roughly , or about 3.1 points.
- Suppose the poll finds 52 percent yes. The 95 percent interval is about 48.9 to 55.1 percent.
Interpretation: if the procedure were repeated many times, about 95 percent of the intervals built this way would contain the true proportion. The interval says how much the sample might mislead you, given that the selection was random. It says nothing about bias, such as people refusing to answer.
The plot below shows how the standard error falls as the sample grows, for .
- standard error, p = 0.5
Tradeoffs and failure modes
Randomness protects against selection bias, but only when the sampling procedure is followed. Several designs are random in some sense and still give misleading results.
| Situation | Problem | Better choice |
|---|---|---|
| Convenience sample (online volunteers, people in one shop) | Members choose themselves, so the sample favours the eager or the nearby | Draw from a frame that lists the whole population, then sample from it |
| Sampling frame misses part of the population (old phone book, outdated list) | Excluded members can never be selected, however random the draw | Build a frame that covers the population, or correct for the gap with weights |
| High non-response (many people refuse to answer) | The respondents may differ from the people who refused, so the error is not captured by the standard error | Track response rates, follow up with non-respondents, and adjust for known differences |
| Population has strata with very different values | A simple random sample may by chance under-represent a small but important group | Stratified sampling: sample each stratum separately and combine |
| Members come in clusters (students in classes, patients in clinics) | Members of a cluster are alike, so the effective sample size is smaller than | Use cluster sampling and account for the clustering in the error |
| Rare subgroup of interest | A simple random sample has too few members in it to estimate anything | Oversample that group, and use weights to put the estimate back on the population scale |
The most famous failure is the 1936 Literary Digest poll. It sent ballots to millions of people chosen from telephone directories and car registration lists. Those lists favoured wealthier households, and the poll predicted a landslide for the wrong candidate. The sample was large, but it was not random with respect to the population of voters. A larger sample from a biased frame only makes you more confidently wrong.
History
Random selection of samples was not always standard. Anders Kiær, the head of Norway's statistical office, argued in the 1890s that a representative sample could be used in place of a full census, and he promoted the idea internationally. Arthur Bowley in Britain later wrote on how to design samples and measure their error, and in the 1930s Jerzy Neyman gave the theory of random sampling its modern mathematical form, including the idea that the probability design, not the particular sample, justifies the estimate.
Random sampling caught on for two reasons. It makes the error of an estimate calculable, and it removes the need to know the characteristics of the population in advance. Polls, government surveys and quality control on production lines all rely on it. The early history involves several people, so treat the attributions as a general outline.
Check yourself
QuestionRecall: what makes a sample a simple random sample, as opposed to one that merely looks varied?Show answer
Every subset of the chosen size must have the same chance of being selected, which is achieved by a chance mechanism. A sample that looks varied can still be biased if the selection procedure favours some members, such as those who answer a web survey or who live near the interviewer.
QuestionComputation: a poll of people, with . What is the approximate standard error of the sample proportion?Show answer
, so the standard error is about 2.5 percentage points. The 95 percent margin of error is about , or roughly 5 points.
QuestionWhy is the sample mean from a simple random sample called unbiased, even though a single sample can be far from the truth?Show answer
Unbiased refers to the average over all possible samples. Each drawn value has the same chance of being any population value, so its expected value equals the population mean. The mean of the sample mean over all samples therefore equals the truth. One particular sample can miss, and the standard error tells you by how much it typically misses.
QuestionApplied: a researcher surveys the first 500 people who click a link in an email newsletter about a local policy. Is this a random sample? What would you change?Show answer
No. The people who click are a self-selected group, probably more interested and more engaged than the general public, so their answers may not represent the population. The standard error formula would give a false sense of precision. To improve it, draw a random sample of residents from a complete list, such as the electoral roll, contact each one, and report the response rate. If the newsletter is the only practical channel, say clearly that the result describes newsletter readers only.