hanegreefs.com/ statistics II
Home / Chapters / 02
Chapter 02 · Course ch. 10

Sampling distributions and confidence intervals for proportions

Why p̂ is roughly Normal, how to build and read a z-interval, and how many respondents you need.

About 14 min read · Lecture material: HOC 2

Priority labels: ImportantNeutralLess important show where to spend revision time.

The sampling distribution of a proportionImportant

Suppose a fraction p of a population has some trait. Draw a random sample of size n and record the sample proportion p̂ = (number with the trait) / n. Repeat the draw many times and the p̂ values pile up in a bell shape centred on p. That pile is the sampling distribution of p̂.

Formula
p̂ ≈ N( p , √(pq / n) ), q = 1 − p

You only ever see one sample, but knowing the shape of the pile lets you say how surprising your one p̂ is. Do not confuse three different distributions: the population, the histogram of your single sample, and this theoretical distribution of the statistic across all samples.

When the Normal model is allowedImportant

Two assumptions, each backed by a checkable condition:

AssumptionConditionWhat to check
IndependenceRandomisationRandom sample, or random assignment in an experiment
Independence10% conditionSampling without replacement: n ≤ 10% of the population
Large enough sampleSuccess/failurenp ≥ 10 and nq ≥ 10 (use p when known, p̂ when building an interval)

A quick numeric example: with p = 0.30 and n = 100 the spread is √(0.30·0.70/100) ≈ 0.046. A sample proportion of 0.49 lies (0.49 − 0.30)/0.046 ≈ 4.1 standard deviations above the centre, which would be astonishing if p really were 0.30.

SD versus SEImportant

The standard deviation √(pq/n) requires the true p. When p is unknown — the usual situation — substitute p̂ and call the result the standard error.

Formula
SE(p̂) = √( p̂ q̂ / n )

Rule of thumb: known p (a claim being tested) → SD; unknown p (building an interval) → SE.

The one-proportion z-intervalImportant

A confidence interval has the shape estimate ± critical value × standard error.

Formula
p̂ ± z* · SE(p̂)

The critical value z* is chosen so that the middle C% of the standard Normal curve lies within ±z* (1.645, 1.960 and 2.576 for 90%, 95% and 99%).

Worked example

Poll on the economy

A poll finds 1,495 of 3,559 adults saying the economy is improving. Build a 95% interval.

1

Sample proportion

p̂ = 1495 / 3559 ≈ 0.420, q̂ ≈ 0.580
2

Standard error

SE = √(0.420 × 0.580 / 3559) ≈ 0.0083
3

Margin of error and interval

ME = 1.96 × 0.0083 ≈ 0.016 → [0.404, 0.436]
Answer

We are 95% confident that between about 40.4% and 43.6% of adults think the economy is improving.

Interpreting an interval correctlyImportant

The population value is fixed; the interval is what varies from sample to sample. If you repeated the whole procedure many times, about 95% of the intervals built this way would contain the true proportion. The coverage simulator in the Lab tab lets you watch that happen.

ClaimVerdict
"We are 95% confident the interval captures the true p."Right
"There is a 95% probability that p lies in this interval."Wrong — p is fixed, not random
"95% of individuals fall in this interval."Wrong — the interval is about p, not about individuals
"95% of other samples' p̂ will land here."Wrong — it describes p, not future p̂ values

Margin of error: certainty against precisionImportant

The margin of error is the half-width of the interval, ME = z*·SE(p̂). You can trade certainty for precision, or buy both with more data:

  • Higher confidence → bigger z* → wider interval.
  • Larger n → smaller SE → narrower interval without losing confidence.
  • p̂ near 0.5 gives the largest SE.

Because SE shrinks with √n, halving the margin of error needs four times the sample.

Choosing the sample sizeImportant

Solving ME = z*·√(p̂q̂/n) for n gives a planning formula. With no prior estimate use the worst case p̂ = 0.5 (it maximises p̂q̂); with a pilot value, use that and enjoy a smaller n. Always round up.

Formula
n = (z*)² · p̂q̂ / ME² → worst case n = (z*)² · 0.25 / ME²
Worked example

How many respondents?

A firm wants a 95% margin of error of 3 percentage points and has no prior estimate.

1

Plug in the worst case

n = 1.96² × 0.25 / 0.03² = 0.9604 / 0.0009 ≈ 1067.1
2

Round up

n = 1068
Answer

At least 1,068 respondents are needed.

Tools: TI-84 and RNeutral

TI-84: STAT ▸ TESTS ▸ A:1-PropZInt builds the interval from x and n. R: prop.test(x, n, correct = FALSE) reports the interval and a test; its default continuity correction slightly changes the numbers, so switch it off to match a hand z-interval.

prop.test(x = 1495, n = 3559, correct = FALSE)$conf.int # sample size planning ceiling(qnorm(0.975)^2 * 0.25 / 0.03^2)

Common mistakesNeutral

  • Using SD(p̂) instead of SE(p̂) in an interval, or the reverse in a test.
  • Checking success/failure with p̂ when p is a given claim (use p), or the opposite for an interval.
  • Reading the interval as a statement about individual observations.
  • Forgetting the 10% condition or applying the formula to a non-random sample (the interval is then meaningless).
  • Rounding a sample-size result down instead of up.

Key takeaways

  • p̂ is roughly Normal with centre p and spread √(pq/n) when randomisation, 10% and success/failure hold.
  • Interval = p̂ ± z*·SE; ME falls with √n; halve the ME by quadrupling n.
  • Plan n with the worst case p̂ = 0.5 unless you have a pilot estimate, and round up.
Question
Tap or press space to reveal
Answer
Did you know it?

Multiple choice

Ch 02 · Question 1

If n quadruples, the standard error of p̂ is…

Why: SE ∝ 1/√n, so 4× the sample halves it.
Ch 02 · Question 2

Which is a condition for the Normal model of p̂?

Why: The success/failure condition.
Ch 02 · Question 3

In 600 trials there are 150 successes. Which statement is correct about the 95% interval?

Why: p̂ = 0.25; SE = √(0.25·0.75/600) ≈ 0.0177; ME ≈ 1.96·0.0177 ≈ 0.035.
Ch 02 · Question 4

Which p̂ is used when planning a sample size with no prior information?

Why: 0.5 maximises p̂q̂ and gives the safest (largest) n.
Ch 02 · Question 5

A 95% CI is [0.41, 0.49]. Which reading is correct?

Why: Confidence refers to the long-run success rate of the procedure.
Ch 02 · Question 6

Switching from 95% to 99% confidence, with the same data, makes the interval…

Why: A larger z* increases the margin.
Ch 02 · Question 7

A required n of 384.2 should be reported as…

Why: Always round up.
Ch 02 · Question 8

The 10% condition protects against…

Why: Sampling a large part of a finite population makes observations dependent.

Exam-style questions

Exam-style · Ch 02

A retailer surveys 800 randomly chosen customers; 296 say they would recommend the brand. (a) Build and interpret a 95% interval for the true share. (b) How many customers are needed for a margin of error of 2 points?

Show outline of a full answer
  1. Check conditions: random, 800 ≪ 10% of customers, 296 and 504 ≥ 10.
  2. p̂ = 0.37, SE = √(0.37·0.63/800) ≈ 0.0171, ME ≈ 1.96·0.0171 ≈ 0.033 → [0.337, 0.403].
  3. Interpretation: confident that the true share lies in this interval; method captures the truth in 95% of samples.
  4. (b) n = (1.96)²·0.37·0.63/0.02² ≈ 2239 (round up); with no prior, p̂ = 0.5 gives 2401.

Sampling distribution simulatorInteractive

Draw thousands of samples and see the pile of p̂ values take a bell shape. Compare with the Normal curve from theory.

Proportion interval and sample sizeInteractive

Enter successes and n for an interval, or a margin of error for the required sample size.

Interval coverage simulatorInteractive

Build many 95% intervals from fresh samples and count how many capture the true value.