Find a course

Module 2: Distributions and SamplingLesson 4 of 1114 min

Samples, Noise and the Standard Error

See why small samples produce extreme results, compute the standard error of a mean and a proportion, and use the central limit theorem with care.

Step 1 of 13Learn

Why the best and worst stores are both small

A retail chain ranked its 400 stores by customer satisfaction. The top ten were almost all small stores. Executives started planning to copy the small-store format everywhere. Then someone looked at the bottom ten. They were also almost all small stores.

Small stores are not better or worse. They have fewer survey responses, and averages based on few observations vary more. A store with 20 responses can easily land at 4.8 or 3.1 out of 5 just by chance; a store with 2,000 responses will sit close to its true value. Small samples crowd both ends of any ranking.

The same pattern shows up everywhere: the counties with the highest and the lowest rates of a rare disease are mostly small counties, the schools with the best and worst test results are mostly small schools, and the sales reps with the most extreme close rates are usually the newest, with the fewest deals.

This lesson gives you the tool to see this coming: the standard error, which measures how much an estimate such as a mean or a percentage would bounce around if you repeated the sampling. It is the foundation of confidence intervals, hypothesis tests and A/B tests, and it explains why sample size matters so much.

Step 2 of 13Chart

Store size vs. satisfaction score

Small stores fill both the top and the bottom of the ranking. Big stores cluster near the middle.

Store size vs. satisfaction scoreScatter plot with 16 points: S1: Customers surveyed per store 20, Satisfaction score 94; S2: Customers surveyed per store 25, Satisfaction score 58; S3: Customers surveyed per store 30, Satisfaction score 90; S4: Customers surveyed per store 35, Satisfaction score 62; S5: Customers surveyed per store 40, Satisfaction score 87; S6: Customers surveyed per store 50, Satisfaction score 66; S7: Customers surveyed per store 60, Satisfaction score 84; S8: Customers surveyed per store 80, Satisfaction score 71; S9: Customers surveyed per store 120, Satisfaction score 80; S10: Customers surveyed per store 150, Satisfaction score 74; S11: Customers surveyed per store 200, Satisfaction score 79; S12: Customers surveyed per store 250, Satisfaction score 75; S13: Customers surveyed per store 300, Satisfaction score 78; S14: Customers surveyed per store 350, Satisfaction score 76; S15: Customers surveyed per store 400, Satisfaction score 77; S16: Customers surveyed per store 450, Satisfaction score 77.50607080901000100200300400500Satisfaction scoreCustomers surveyed per store
Illustrative data. Every store has the same true score of about 77; small samples simply bounce around more.
Store size vs. satisfaction score
PointCustomers surveyed per storeSatisfaction score
S12094
S22558
S33090
S43562
S54087
S65066
S76084
S88071
S912080
S1015074
S1120079
S1225075
S1330078
S1435076
S1540077
S1645077

Step 3 of 13Learn

The standard error of a mean

Imagine taking many random samples of 100 customers and computing the average order value in each. The averages would not all be the same; they would form their own distribution, called the sampling distribution of the mean. Its standard deviation is the standard error (SE):

SE = s / √n

where s is the standard deviation of individual values and n is the sample size.

Two things follow. First, more variable data means noisier averages. Second, and more important, noise shrinks with the square root of the sample size. Quadrupling the sample halves the standard error. Going from 100 to 400 customers cuts the noise in half; going from 400 to 1,600 cuts it in half again. Each further improvement costs four times as much data.

Example: order values have an SD of $40. With n = 100, SE = 40 / 10 = $4, so sample averages will typically land within about ±$8 (2 SEs) of the true mean. With n = 1,600, SE = 40 / 40 = $1, so typically within about ±$2.

Keep the two quantities apart: the SD describes how much individual customers differ from each other, and it doesn't shrink as you collect more data. The SE describes how precisely you know the average, and it does.

Step 4 of 13Explore

How the standard error shrinks with sample size

The curve shows SE = s / √n as the sample size grows along the x-axis. Notice how quickly the gains flatten out.

051015 5001,0001,5002,000
SE at n = 100
4
SE at n = 400
2
SE at n = 1,600
1

Step 5 of 13Practice · Work it out

Session lengths on a website have a standard deviation of 40 seconds. For a random sample of 400 sessions, what is the standard error of the mean session length, in seconds?

Step 6 of 13Learn

The standard error of a proportion

Most business metrics are proportions: conversion rates, click-through rates, churn, defect rates, survey percentages. For a proportion p measured on n independent observations, the standard error is

SE = √( p(1 − p) / n )

A poll of 1,000 people where 50% support a policy has SE = √(0.5 × 0.5 / 1,000) ≈ 0.0158, or about 1.6 percentage points. Doubling to 2 SEs gives the familiar "margin of error of about ±3 points" for national polls of around 1,000 people.

The term p(1 − p) is largest at p = 0.5, so proportions near 50% are the noisiest in absolute terms. Rare events have small absolute SEs but large relative ones: a conversion rate of 2% measured on 1,000 visitors has SE ≈ 0.44 points, which is more than a fifth of the rate itself. That is why detecting a change from 2.0% to 2.2% takes very large samples, a fact you will meet again in A/B test planning.

Notice what the formula leaves out: the population size. A sample of 1,000 gives about the same precision whether it is drawn from a city of 100,000 or a country of 300 million, as long as it is random. What matters is how many you sample and how you sample them, not what fraction of the population you reach.

Step 7 of 13Practice · Work it out

In a random sample of 400 customers, 20% say they would recommend a new feature. What is the standard error of that proportion, in percentage points?

Step 8 of 13Learn

The central limit theorem

Order values, session lengths and revenue per user are usually skewed, so why do analysts use the normal curve for their averages? Because of the central limit theorem (CLT): for independent observations from almost any distribution with finite variance, the distribution of the sample mean gets closer to a normal distribution as the sample size grows, centered on the true mean with standard deviation equal to the standard error.

That is a remarkable result. Individual order values may be wildly skewed, yet the average of 500 orders will vary from sample to sample in a nearly bell-shaped way. It's what allows you to say "the true mean is within about 2 SEs of the sample mean, 95% of the time" without knowing the shape of the raw data.

Its cousin, the law of large numbers, says the sample mean converges to the true mean as n grows. Together they explain why big samples give stable, predictable averages.

How large is large enough? For roughly symmetric data, 30 or so observations often suffice. For skewed data you need more. For extremely long-tailed data, such as revenue where one customer can be worth more than all others combined, the sample mean can stay unstable even with thousands of observations, and medians, trimmed means or log transformations are safer.

Step 9 of 13Chart

Skewed orders, bell-shaped averages

Individual orders are right-skewed. Averages of 50 random orders pile up symmetrically around the true mean.

Skewed orders, bell-shaped averagesBar chart with 7 categories: $0–20: Individual orders 30%, Averages of 50 orders 0%; $20–40: Individual orders 25%, Averages of 50 orders 2%; $40–60: Individual orders 16%, Averages of 50 orders 30%; $60–80: Individual orders 11%, Averages of 50 orders 60%; $80–100: Individual orders 7%, Averages of 50 orders 8%; $100–150: Individual orders 7%, Averages of 50 orders 0%; Over $150: Individual orders 4%, Averages of 50 orders 0%.0%20%40%60%Share$0–20$20–40$40–60$60–80$80–100$100–150Over $150Order value
Illustrative. This is the central limit theorem at work: the sampling distribution of the mean is close to normal even when the data are not.
Skewed orders, bell-shaped averages
Order valueIndividual ordersAverages of 50 orders
$0–2030%0%
$20–4025%2%
$40–6016%30%
$60–8011%60%
$80–1007%8%
$100–1507%0%
Over $1504%0%

Step 10 of 13Note

Step 11 of 13Practice · What would you do?

What would you do?

A ranking of 300 sales representatives by close rate shows that the top five all joined in the last two months and have handled between 6 and 12 deals each. A manager wants to give them a special bonus and use their methods as the team standard. What is your advice?

Step 12 of 13Practice · Choose one

An analyst wants to cut the standard error of an estimated mean in half. By what factor must the sample size grow?

Step 13 of 13Practice · Fill in the blanks

Fill in the blanks

The standard error of a mean equals the standard deviation divided by the square of the sample size. Unlike the standard deviation, the standard error as you collect more data.