Sample size and the square root rule · Statistics &… | StemPy Lab
Course 6.1·Lesson 3 of 3
Sample size and the square root rule
The standard error of a sample share is np(1−p)
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
find the standard error of a sample share;
use the square root rule to plan the size of a sample;
explain why the size of the population hardly matters.
The standard error of a share
In the school, the true share of cyclists is p=0.35. The sample share p^ has its own sampling distribution. It is centred at p, and its standard error is
SE=np(1−p).
For samples of 40 students, SE=400.35×0.65≈0.0754. That is why the five friends missed by up to about 0.075.
Four times as many, half the error
The sample size sits under a square root. So
Sample size
Standard error
40
0.0754
160
0.0377
640
0.0189
Each time the sample is four times as large, the standard error halves. To make it ten times smaller, you need a hundred times as many people. This is the square root rule. Precision is expensive.
You should also see that p(1−p) is largest at p=0.5. A share near one half is the hardest to pin down.
Three histograms stacked on the same horizontal scale of sample share, from 0 to 0.7, each made of 1000 simulated sample shares when the true share is 0.35. The top one is for samples of 25, the middle one for samples of 100 and the bottom one for samples of 400. A red dashed line marks 0.35 in each, and the histograms get narrower from top to bottom.
The picture shows 1000 simulated sample shares for each of three sample sizes. The middle histogram is about half as wide as the top one, and the bottom one about half as wide again.
Try it in Python
The program draws 500 samples for each of four sample sizes. It compares the spread of the sample shares with the rule.
The population size hardly matters
A random sample of 1000 adults gives almost the same standard error for a city of a million as for a country of a hundred million. The formula has no population size in it. What matters is how many people you ask, not what fraction of the population they are.
There is a small exception. When the sample is a large part of the population, say more than a tenth, the standard error is a little smaller than the formula says. Asking 900 of 1000 people leaves little room for chance.
Planning a sample
Suppose you expect a share near 0.3 and want a standard error of at most 0.02. You need
n0.3×0.7≤0.02,son≥0.00040.21=525.
Practise with new numbers
Common mistakes
Doubling the sample to halve the error. Doubling divides the standard error by only 2≈1.41. You need four times the sample.
Thinking a bigger population needs a bigger sample. For a sample that is a small part of the population, the population size hardly matters.
Forgetting bias. A huge sample from a biased method has a tiny standard error and a large error. The rule measures chance only.
Remember these
The standard error of a sample share is np(1−p), and of a sample mean nσ.
Both shrink like n1: four times the sample, half the error.
The population size hardly matters unless the sample is a large part of it.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
The true share is 0.5. Find the standard error of p^ for samples of 25.
A survey of 150 people has a standard error of 0.04. What standard error would a survey of 600 people have?
You want a standard error 5 times smaller than your pilot survey gave. By what factor must you multiply the sample size?
A random sample of 800 people is taken in a city of 2 million and another in a country of 50 million. Which standard error is smaller?
A website asks its visitors to vote, and 100000 people answer. Is its result more reliable than a random sample of 1000 people?
References
OpenStax, Introductory Statistics, Chapter 7, section on the central limit theorem for proportions, and Chapter 8 on choosing a sample size.
Enroll free in Sampling Variability and Sample Size
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.
. It falls like one over the square root of the sample size, so four times as many people halve it. The size of the population hardly matters. This lesson shows the rule by simulation and uses it to plan a sample.
about 25 min1 simulation1 practice question1 Python program6 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.