Interactive Lessons

Sampling distributions

Lecture notes

Definition

Population and parameter

The population is the whole group we want to know about: every pupil of a school, every bag a machine fills. A number that describes the whole population is a parameter: the population mean , the standard deviation , the share . A parameter is one fixed number, even when we do not know it.
111315171921
Example
A chess club has 8 members, aged . The population is the 8 members.The parameters are years and ; the share aged 16 or more is .
Definition

Sample and statistic

A sample is the part of the population that we really look at. A number worked out from the sample is a statistic: the sample mean , the sample share , the sample standard deviation . A statistic depends on which members were chosen.
Example
From the club we take 3 members, aged .Then and (two of the three are 16 or older), while the parameters are and .
Rule

The estimate changes from sample to sample

A statistic used to guess a parameter gives an estimate: estimates , estimates . Another sample gives another estimate. So an estimate is near the parameter, but it is not the parameter: the parameter stays, the estimate changes.
12131415161718μ
Example
Three samples of 3 members: and and give , and , while stays.The three estimates miss by , and .
Definition

The sampling distribution

Take all possible samples of size and work out the same statistic for each. These values form a distribution: the sampling distribution of the statistic. It tells how the statistic behaves from sample to sample; the cards that follow are about it.
00.511.522.531.5
Example
The population is the digits , each equally likely. All samples of size 2 (with replacement) give with counts out of 16.Their mean is and their variance is , half of the population variance .
Rule

A random sample

In a simple random sample every member of the population has the same chance, and so has every possible sample. Nothing in the method leans to one side: over many samples the sample means are centred on . A sample chosen by who is easy to reach, or who wants to answer, has no such guarantee.
Example
We choose 3 of the 8 club members by drawing names. There are possible samples, each with chance , and every member is in the sample with chance .
Rule

Four ways to choose a sample

Random: drawn by chance. Every -th name of a list: fair as long as the list has no repeating pattern. Convenience (opportunity sampling): people who are easy to reach. Volunteers: people who choose to answer. The last two are biased: their sample means centre on the mean of the part of the population the method can reach.
1213141516171819μ
Example
Samples of 2 from the club.All 28 pairs (random): the sample means average . Only the 5 nearest members (convenience): they average , that is from . Only the 5 volunteers : they average , that is .
Watch out!

Bias and spread are two different things

A bigger sample makes the sample means gather closer together (less spread), but it does not move their centre. A big biased sample is still biased: it is only precisely wrong. Bias is about the centre, spread is about how far the estimates scatter.
n=2n=412131415161718μ
Example
The 5 nearest members (convenience), samples of 2 and of 4 without replacement.Both have the centre , which is from . But the standard deviation of falls from () to ().
Tip

Is the method poor? Three questions

To judge a sampling method ask three questions. Who can be chosen? Is anyone left out? Does everyone have the same chance? Who answers? Do those who answer differ from the rest? If one answer is no, say in which direction the result is pushed, and remember that a larger sample does not repair it.
Example
A shop asks the first 100 customers on Saturday morning whether the opening hours are good.Who can be chosen: only Saturday morning customers; evening and weekday customers are left out. The result is pushed towards people who like mornings, and asking 1000 of them would not repair that.
Rule

From a sample to an informal inference

We use an estimate to say something about the parameter, but only informally: "the share is probably around ". The sampling distribution shows how far an estimate can be off. A sample does not give the exact value, and another random sample would give another statement: that is the limit of sampling.
00.20.40.60.81
Example
In a sample of 50 pupils, 14 say yes: .If the true share were , then a share of all such samples has between and (counts 9 to 21, exact binomial). So is an ordinary result for , but one sample cannot prove that is exactly .
Definition

The sample mean is a random variable

Before the sample is drawn, the sample mean is a random variable: it takes different values for different samples. After the draw we have one value . The capital is the variable, the small one observed value.
0123μ
Example
A population table: with probabilities . Then and .One sample of 2 is : . Another is : . Different samples, different values of .
Rule

The expected value of the sample mean

The expected value of the sample mean is the population mean: for every . Over all samples the sample means balance at , so is an unbiased estimate of . This does not say that one sample mean equals .
01231.601231.6
Example
The table above with : takes the values with probabilities .Then .
Rule

The variance and the standard error

The values in a random sample are independent, so their variances add: . Dividing the sum by divides the variance by : . The standard deviation of is ; it is called the standard error.
Example
Test scores have . The mean of scores has , so the standard error is .For the table above and : , and that is what the exact table of gives.
Rule

More values, a narrower mean

The standard error falls as grows, but only like : four times as many values halve it. It is the spread of that falls; the spread of the population stays as it is.
100
Example
With and the standard error is , and : each curve is twice as narrow as the one before.The mean of 16 values scatters four times less than one value.
Rule

The exact table of the sample mean

For a small population table the whole distribution of can be listed: write down every sample, work out its and add the probabilities of equal values. Then every probability about is a sum of table entries, with no approximation.
0.0100.080.2210.280.2520.120.043
Example
Same table, (picture): .For the same method gives , and .
Rule

A normal population gives a normal sample mean

If the population is normal, , then exactly, for every : a sum of independent normal variables is normal. So is a normal probability whose standard deviation is .
0.25251101000.0228110100
Example
Test scores . One score: .The mean of scores: and . A mean of 9 is far less likely to be this high.
Rule

A probability about the sample mean

To find : (1) state the model, ; (2) standardise with the standard error, ; (3) read from the table, or type the calculator line with in the place of the standard deviation.
0.0668235250
Example
Reaction times are ms and : .: , so the probability is . Calculator: \texttt{normalcdf(-1E99, 235, 250, 10)}. One reaction below 235 has .
Watch out!

σ or σ / √n?

A common mistake: standardising a sample mean with instead of . Ask: is the question about one value, or about a mean of values? One value: . A mean of values: .
0.15871741700.3085174170
Example
Heights , the mean of pupils, .Right: , probability . Wrong: gives , which is the probability for one pupil taller than 174 cm.
Rule

The conditions

Before using the normal model for check three conditions. Random: the sample is a random sample. 10%: when sampling without replacement, is at most 10% of the population size , so the draws are almost independent. Normal: the population is normal, or is large (central limit theorem); a small with strong skew or outliers fails.
Example
A school has pupils.A random sample of passes the 10% condition (). A sample of does not (): the draws are no longer nearly independent.
Definition

The sample proportion

The sample proportion is , where is the number in the sample with the property. For a random sample that is small against the population, with the share in the population. So is a random variable and an unbiased estimate of : .
Example
A poll of pupils: 14 say yes, so .Another sample of 50 may give 17 yes: . The share in the school stays the same; only the sample changes.
Rule

The mean and the standard deviation of p̂

and , so . This follows from with and . As for the mean, four times as many people halve the standard deviation.
0.30.110.170.240.360.430.49
Example
and : and .With (four times as many) it is , half of it.
Rule

The exact distribution of p̂

The exact distribution of is the binomial distribution with the counts divided by : . An event about is an event about the count: means . No approximation is needed.
00.20.40.60.81
Example
and : is , so .Calculator: \texttt{binomcdf(50, 0.3, 10)}.
Rule

The normal model and the continuity correction

For large the bars of follow the normal curve . The bars are discrete: treat as the count and use the continuity correction with the boundary . The corrected value is usually much closer to the exact one than the uncorrected value.
381318232810.5
Example
The same example: .Corrected: , so . Uncorrected: , so . The exact value is : errors and .
Rule

The conditions for p̂

The normal model for needs a random sample, at most 10% of the population, and enough successes and failures: and both at least 10 (the AP rule) or at least 5 (the Cambridge rule). Otherwise the bars are lopsided and a normal curve does not follow them.
00.20.40.60.81
Example
, : and , both at least 10: fine., : is too small. The bar has and sits against the edge, and the curve ignores that cannot be negative.
Rule

Say it as a sentence about samples

Say a probability about (or ) as a sentence about samples: "In random samples of size from a population in which …, the chance that … is about …". The probability belongs to the statistic. The parameter appears in the condition of the sentence, not in the event.
Example
In random samples of 50 from a population in which 30% support the plan, the chance that at most 20% of the sample support the plan is about 0.0789.
Watch out!

A probability about the sample, not about p

A common mistake: to read the as a statement about the parameter, as if were the thing that varies. The share in the population is one fixed number; it is the samples that vary. The sentence is about the sample share in the samples drawn from this population. The same holds for a mean: a statement about belongs to the samples, not to .
Example
Better: "If the share is 30%, then about 7.9% of the samples of 50 have at most 20% supporters." Here 30% is given, and the 7.9% counts samples.A poll that finds 20% does not turn the share into 20%; it is one sample from the many that could have been drawn.
Rule

Shapes become bells

The central limit theorem: whatever the shape of a population (with a mean and a standard deviation), the distribution of comes closer to the normal curve as grows. The bars of turn into a bell that keeps the centre and gets narrower.
036903690363
Example
A right-skewed population (the values 1 to 10, mean , ). The pictures show the exact distribution of for with the normal curve: lopsided for , a bell for .The skew of is the skew of one value divided by : , , and .
Rule

How large is large?

How large must be depends on the population. The rules: Cambridge says "a large sample" without a number, IB says that is considered sufficient in examinations, AP uses . They are rules of thumb. The application also measures the biggest gap between a bar of and the curve as a share of the peak, and the skew of ; it calls them close to normal when the gap is under 8% and the skew under 0.2.
Example
Right-skewed population, gap (share of the peak) and skew of :: % and ; : % and ; : % and ; : % and .At the gap is small but the skew is still above 0.2; at both are small. A normal-like population is close to normal from (gap %).
Watch out!

A very skewed population

Caution (AP): when the population is extremely skewed, or holds one huge value, may not be enough. Look at the picture of , not only at the number .
00.511.52
Example
A population where 99% of the values are 1 and 1% are 10 (mean ).A sample of 30 holds no 10 with chance , so in about % of the samples exactly; in the others it jumps in steps. The skew of is still at and at (gap % and % of the peak).
Rule

Sums and means

The sum and the mean are the same draws on two scales. When is close to normal, so is : and . The sum has mean and standard deviation .
5060708090100110
Example
The right-skewed population, : has mean and variance , so standard deviation .: exact ; normal with the continuity correction (boundary 99.5, ) ; without () . The event is the same event.
Watch out!

The theorem is about the sample mean

A common mistake: "with a large sample the data become normal". The histogram of one large sample keeps the shape of the population. The theorem is about the distribution of over many samples. A larger sample does not change the population; only the distribution of narrows and rounds off.
Example
The right-skewed population has skew , so a histogram of 30 values taken from it is lopsided too.The means of many samples of 30 have skew : they are the ones that look like a bell.
Definition

Estimator and unbiased

An estimator is a rule that turns a sample into an estimate of a parameter ( for ). It is unbiased if its expected value is the parameter: averaged over all samples the estimates hit the parameter. A biased estimator is wrong on average, always on the same side.
Example
The population is : and .We take all samples of size 2 (with replacement) and average an estimator over them. It is unbiased when that average equals (or ), whatever the single samples do.
Rule

The sample mean is unbiased

The sample mean is an unbiased estimate of : . You can check it by listing all the samples of a small population: the average of all the sample means is exactly .
2461222347434586456912789126=6
Example
All 16 samples of size 2 from (picture: the cell is of the row value and the column value). The 16 means add up to , so their average is .Single means run from 2 to 12, the average is exactly right.
Rule

The sample variance with divisor n − 1

The sample variance (divisor ) is an unbiased estimate of . With the divisor it is too low on average: .
2461220285042023268201812503218014=142461220142541011664109122516907≠14
Example
The same 16 samples, . Divisor : the cells run from 0 to 50, add up to and average .Divisor halves every cell: total , average .
Tip

Why n − 1?

The deviations from are smaller than the deviations from , because is the centre of this very sample. Exactly: . So is too small by , which is on average. Dividing by instead of repairs that.
Example
The sample from the population with : .With : and , and .
Rule

Computing x̄, s² and s

From data: , and . From the sums , and : . Keep fractions or many decimals until the end.
Example
, , : ., so and . With the divisor : .
Tip

Sx and σx on the calculator

A calculator gives two standard deviations. has the divisor : the estimate of from a sample. has the divisor : for a list that is the whole population. For a sample use . Some makes and books write and , or and .
Example
Data : and . and .
Watch out!

The maximum and the range are biased

Not every natural statistic is unbiased. The sample maximum is too low as an estimate of the population maximum, and the sample range too low as an estimate of the population range, because a sample usually misses the extremes. Their average over all samples lies below the target.
2461222461244461266661212121212128≠1224612202410420286420612108604≠10
Example
and the 16 samples of size 2: the maximum averages but the population maximum is ; the range averages but the population range is .
Watch out!

Unbiased is about the long run

Unbiased does not mean that one estimate is right: it means that the estimates are right on average over many samples. An unbiased estimator can still be far off in one sample. Also is a slightly biased estimate of , even though is unbiased for .
43.2110002.55
Example
A seeded run (picture): population , samples of 5. The running means of settle near the targets: with divisor at (green) and with divisor at (blue).For the average of over the 16 samples is , below .
Rule

Unbiased and a small spread

Two unbiased estimators can differ in spread. The one with the smaller variance is better, because its single estimates lie closer to the target. A good estimator is unbiased (the centre is right) and has a small variance (little scatter).
246810126
Example
To estimate from 2 draws: the first draw alone is unbiased with variance ; is unbiased with variance .In the picture the 16 first draws (blue) are spread over 2 to 12, the 16 means (green) are less spread.
Rule

Poll size

In a poll of people the sample share has standard deviation , largest at . About 95% of the polls land within standard deviations of . The margin shrinks like , so halving the margin needs four times as many people.
0.5
Example
With and the standard deviation is , and .For a margin of : , so . (The exact binomial gives for lying within .)
Rule

Bags of flour

A machine fills bags with mean weight and standard deviation . One bag varies with ; the mean of bags varies with . So a question about one bag below the label uses and a question about the mean of bags uses .
0.008210001012
Example
g, g, label g, normal weights. One bag is under the label with chance .The mean of bags: , , .
Rule

Journey times

Journey times are usually skewed to the right: a few very long ones. The mean of journeys is then only approximately normal, and better the larger is. For a safe statement compare with the exact distribution, or look at the skew of .
10152025
Example
Times minutes with the right-skewed shape: mean min, standard deviation min, skew .: is exactly , the normal model says (skew of ). : exact , normal : the normal model underestimates the upper tail.
Rule

Lab readings

Repeat a measurement times: the readings have a spread , and the mean of the readings has the standard error . The mean is more reliable than one reading, and four times as many readings halve the standard error.
11.711.912.112.312.5
Example
Readings : , , standard error .With 24 readings of the same spread the standard error is , half of it.
Tip

Which course asks what

Cambridge 9709 (Paper 6): sample and population, the sample mean as a random variable, the central limit theorem, unbiased estimates of the mean and variance. UK GCSE and A level: infer from a sample, population and sample, sampling techniques. IB (AA and AI): sampling and bias; AI HL: unbiased estimates and the central limit theorem. AP Statistics: sampling distributions of and , conditions, unbiased estimators. Common Core: statistics as inference from a random sample. Netherlands: wiskunde A vwo, a statement about a population from a sample.
Example
A typical exam question: a population has mean and standard deviation ; a random sample of .The standard error is , and : , so (the central limit theorem, because is large).

Exercises

A school has 800 pupils; 40 of them are asked how they travel and 22 say they cycle. Name the population and the sample. Is a parameter or a statistic? Easy
Show solution
The population is all 800 pupils; the sample is the 40 who were asked.
is worked out from the sample, so it is a statistic: .
The share of all 800 who cycle is the parameter ; estimates it.
Population: the 800 pupils; sample: the 40; is a statistic
Check → another sample of 40 would probably give another ; would stay.
A random sample of 5 pupils has heights cm. The mean height of all the pupils is cm. Find and the difference . Easy
Show solution
Add the heights: .
Divide by : .
The difference is cm: this sample is a little above .
cm, difference cm
Check → the mean 66 lies between the smallest (62) and the largest (71) value.
A population has standard deviation . Find the standard error of the sample mean for , and for a sample four times as large. Easy
−36036
Show solution
The standard error is .
Four times as large is : .
Four times the sample size halves the standard error; the population spread does not change.
for and for
Check → and .
In a population 40% have a property. A random sample of is taken. Find the mean and the standard deviation of the sample share . Easy
0.30.40.5
Show solution
The mean of is .
The variance is .
The standard deviation is .
Mean , standard deviation
Check → .
A sample is . Find the sample mean , the sample variance (divisor ) and . Easy
Show solution
.
The squared differences: .
and .
, ,
Check → with divisor you would get , a smaller number than 13.
A school has 250 pupils. A random sample is taken without replacement and the 10% condition must hold. What is the largest sample size ? Easy
Show solution
The 10% condition says .
Here , so .
The largest sample has pupils.
Check → is exactly a tenth of .
Scores are normal, . Find for a random sample of , and compare it with for one score. Medium
0.15875105000.4013510500
Show solution
The model is , because .
, so .
For one score and .
against
Check → a mean of 16 scores is less likely to be far from 500 than one score, so .
A population has standard deviation . How large must a random sample be for the standard error of the mean to be at most ? Medium
Show solution
We need , so .
Square: .
Check → .
In a population 60% agree; a random sample has . Check the conditions and find with the continuity correction (exact value ). Medium
343842465054586239.5
Show solution
and , both at least 10: the normal model is fine.
means , and .
Boundary : , so .
(exact )
Check → without the correction (boundary 39) you get , further from .
A town has people. A random sample of is taken without replacement and asked a yes / no question; about 5% are expected to say yes. May the normal model for be used? Medium
Show solution
Randomisation: the sample is random, so this condition is met.
10% condition: and : not met.
Counts: , under 10 (and under 5): not met.
No: two conditions fail (10% and ), only the random one holds
Check → a sample of 40 or fewer would pass the 10% condition, but would still be too small.
From a sample, , and . Find and with the divisor , and compare with the divisor . Medium
Show solution
and .
; with the divisor : .
, (divisor : )
Check → the divisor gives the smaller number: .
Population , all 9 samples of 2 with replacement. Show: averages , (divisor ) averages , divisor gives half. Medium
1381124.53235.584.55.584=413810112.253106.25812.256.2504.33≠8.67
Show solution
, . The nine means add up to : average .
The nine values of add up to : average .
Divisor halves every value: average .
Averages: and ; with the divisor :
Check → half of is .
Journey times (right-skewed): mean min, standard deviation min, . Find and name the rule that allows the normal model. Hard
0.03332017.7
Show solution
Central limit theorem: (the AP rule). .
, so .
The exact distribution of this skewed shape gives : a little more.
(exact: )
Check → model and exact value differ by less than .
A poll wants a margin of , where the margin is standard deviations of (about 95%). Take the worst case . How many people are needed? How many for a margin of ? Hard
Show solution
, so : round up to .
A margin of is half, so four times as many: , so .
for and for
Check → is about four times ().
Bags of flour are normal, mean g, standard deviation g. Find the chance that the mean of 9 bags is within g of g, and the same for one bag. Hard
?100910151012
Show solution
Mean of 9: , so and .
One bag: , so .
About for the mean of 9 and for one bag
Check → the mean stays near 1012 more often than one bag: .
Samples of 50 from a population where 30% support a plan: . Which sentence is correct?A: As is small, the share is below 20%.B: If the share is 30%, 7.9% of samples have at most 20% supporters.C: This poll is wrong with chance 7.9%. Hard
Show solution
counts samples for a given share, 30%. A and C turn it into a statement about the share or about “wrong”.
Only B keeps the share in the condition.
B
Check → B begins with “If the share is 30%”.
and are independent, with mean and variance . Show that and are both unbiased for and find which has the smaller variance. Hard
T1T2246810126
Show solution
and : both are unbiased.
.
.
Both are unbiased; has the smaller variance
Check → ; in the picture the row of is wider.
A pupil computes the variance of samples of size 5 with the divisor . The population variance is . By what factor, and to what value, is the average of her results wrong? How does she repair it? Hard
Show solution
With the divisor the average is : too low by the factor .
She repairs it by dividing the same sum of squares by instead of : .
Too low by the factor : instead of ; divide by
Check → .
A convenience sample of 10000 has a mean that is typically 2 g too low. A random sample of 100 comes from a population with g. Compare the standard errors and the kind of error. Hard
Show solution
The standard error for is g; for it is g.
The big sample is precise but biased by about 2 g; more people would not change that. The random sample is unbiased: its error is only random.
The big sample has the smaller standard error ( g against g) but a bias of about 2 g; the random sample is unbiased
Check → bias is about the centre, and a larger does not move it.
Are you a teacher?

Start live lessons with these applications for your whole class. Free to try for one month.

Try it free

Fits these school years

IB (MYP, Diploma): MYP 5, Diploma, year 1, Diploma, year 2

Cambridge International: A Level

Netherlands: Havo · Mathematics A, Vwo · Mathematics A

England (GCSE, A Level): Year 12 (A Level), Year 13 (A Level)

USA (Common Core): Algebra 2, Precalculus

What the applications of this topic teach 6 applications

Population and sample: sample, population and bias

  • Telling a population from a sample and a parameter from a statistic
  • Explaining why a sample needs to be random
  • Explaining that a bigger sample narrows spread but not bias

Sample means: the distribution of the sample mean

  • Describing the sample mean as a random variable with standard error
  • Finding a probability for the sample mean of a normal population
  • Checking conditions: random, 10%, normal or large

Sample proportions: the distribution of the sample share

  • Finding the mean and standard deviation of the sample share
  • Finding a probability for the sample share, exact and normal
  • Saying the probability as a sentence about samples

Central limit theorem

  • Stating the central limit theorem for sample means
  • Judging how large the sample size needs to be from the skew
  • Using the approximately normal sum of n values

Unbiased estimates: mean and variance of a sample

  • Saying what an unbiased estimator is and checking it
  • Saying why s² has the divisor n − 1
  • Computing the mean, s² and s from data and from sums

Sampling in everyday life

  • Using the spread of the sample share for a poll and its size
  • Using the standard error for the mean of n bags or journeys
  • Seeing that four times as many readings halve the standard error