Confidence intervals

Print the chapter

Every lesson of the chapter, ready for paper. Exercise sets are lettered A, B, C… and answered at the end.

To save a PDF, choose “Save as PDF” in the print dialog.

1. Point estimates and margins of error

Warm-up

Three quick questions from earlier lessons.

Discover

A poll reports 52% support, "plus or minus 3 points". Which range of values is plausible for the true support?

  1. 49% to 55%
  2. 52% to 55%

Key idea

An interval estimate: point estimate ± margin of error.

A confidence interval is estimate±margin of error\text{estimate} \pm \text{margin of error}, with margin of error =(critical value)×(standard error)= (\text{critical value}) \times (\text{standard error}). The point estimate is the center of the interval; the margin of error is half its width. Larger samples give smaller margins.

Worked example

Interval (0.42, 0.50).

Point estimate =0.46= 0.46
Center.
Margin of error =0.04= 0.04
Half the width.
0.46±0.040.46 \pm 0.04
Written as estimate ± ME.

Your turn, guided

Your turn: interval (12, 20). The margin of error.

44
(20 − 12)/2.

Practice ★

  1. A 95% confidence interval for a proportion is (39/100, 49/100). Find the margin of error.
  2. A 95% confidence interval for a proportion is (20/100, 32/100). Find the margin of error.
  1. A confidence interval for a mean is (41, 55). Find the point estimate.

Watch out!

Practice ★★

  1. A 95% interval from a sample of 591 is too wide. Which change makes it narrower?
    1. A larger sample size
    2. A higher confidence level, such as 99%
    3. Nothing: the width is fixed by the population

Exit ticket

Three questions to check you have got it.

  1. A 95% confidence interval for a proportion is (39/100, 49/100). Find the margin of error.
  2. A 95% confidence interval for a proportion is (20/100, 32/100). Find the margin of error.
  3. A 95% confidence interval for a proportion is (27/100, 37/100). Find the margin of error.

Summary card

Interval estimates

Estimate ± ME, ME = critical value × SE; ME = half the width.

Watch out: width = 2 × ME.

2. Confidence intervals for a proportion

Warm-up

Three quick questions from earlier lessons.

Discover

In a sample of 400, p̂ = 0.5. The standard error is 0.5×0.5/400=0.025\sqrt{0.5 \times 0.5 / 400} = 0.025. For 95% confidence (z* ≈ 2), what is the margin of error?

  1. 0.05
  2. 0.025

Key idea

The one-proportion z interval.

p^±z∗p^(1−p^)n\hat{p} \pm z^*\sqrt{\dfrac{\hat{p}(1 - \hat{p})}{n}}, for a random sample with np^≥10n\hat{p} \ge 10 and n(1−p^)≥10n(1 - \hat{p}) \ge 10. For 95% confidence, z∗=1.96z^* = 1.96. Interpret: "we are 95% confident that the interval captures the population proportion".

Worked example

n=100n = 100, p^=0.3\hat{p} = 0.3, 95%.

SE≈0.0458SE \approx 0.0458
√(0.3 × 0.7/100).
ME≈0.090ME \approx 0.090
1.96 × SE.
(0.210,0.390)(0.210, 0.390)
0.3 ± 0.090.

Your turn, guided

Your turn: SE = 0.02 and z* = 2. The margin of error.

0.040.04
2 × 0.02.

Practice ★

  1. In a random sample of 400, p̂ = 5/10. Using z* = 1.96, find the margin of error of a 95% interval for p.
  2. In a random sample of 400, p̂ = 9/10. Using z* = 1.96, find the margin of error of a 95% interval for p.
  1. In a random sample of 100, p̂ = 3/10. Using z* = 2, find the upper end of the approximate 95% interval for p.

Watch out!

Practice ★★

  1. A 95% confidence interval for the proportion of voters who support a plan is (0.48, 0.52). Which interpretation is right?
    1. We are 95% confident that the interval from 0.48 to 0.52 captures the true proportion of supporters
    2. 95% of the sample supports the plan
    3. There is a 95% probability that p is between 0.48 and 0.52
  1. Boss problem. In a random sample of 100, p̂ = 3/10. Build a 95% interval with z* = 1.96.

Exit ticket

Three questions to check you have got it.

  1. In a random sample of 400, p̂ = 5/10. Using z* = 1.96, find the margin of error of a 95% interval for p.
  2. In a random sample of 400, p̂ = 9/10. Using z* = 1.96, find the margin of error of a 95% interval for p.
  3. In a random sample of 400, p̂ = 8/10. Using z* = 1.96, find the margin of error of a 95% interval for p.

Summary card

Interval for p

p^±z∗p^(1−p^)/n\hat{p} \pm z^*\sqrt{\hat{p}(1 - \hat{p})/n}; check random and large counts.

Watch out: "confident", not "probability", for a computed interval.

3. Confidence level and critical values

Warm-up

Three quick questions from earlier lessons.

Discover

To be more confident of catching a fish, should you use a wider or a narrower net?

  1. Wider
  2. Narrower

Key idea

The confidence level describes the method.

Common critical values: z∗=1.645z^* = 1.645 (90%), 1.961.96 (95%), 2.5762.576 (99%). Higher confidence gives a wider interval. The confidence level is the proportion of intervals, in repeated random sampling, that capture the parameter.

Worked example

p^=0.6\hat{p} = 0.6, SE=0.04SE = 0.04.

90%: ME ≈ 0.066
1.645 × 0.04.
95%: ME ≈ 0.078
1.96 × 0.04.
99%: ME ≈ 0.103
2.576 × 0.04.

Your turn, guided

Your turn: SE = 0.05, 95% (z* = 2 approx). The margin of error.

0.10.1
2 × 0.05.

Practice ★

  1. From the same sample of 458, a 99% and a 90% interval are computed. Which is wider?
    1. The 99% interval
    2. The 90% interval
    3. They have the same width
  1. A 95% interval (z* = 1.96) has margin of error 0.07. From the same data, find the margin of error of a 99% interval (z* = 2.576).
  2. A 95% interval (z* = 1.96) has margin of error 0.06. From the same data, find the margin of error of a 99% interval (z* = 2.576).

Watch out!

Practice ★★

  1. What does the confidence level 90% mean?
    1. In repeated random sampling, about 90% of the intervals built this way capture the parameter
    2. This interval contains the parameter with probability 90%
    3. 90% of the data fall in the interval

Exit ticket

Three questions to check you have got it.

  1. A 95% interval (z* = 1.96) has margin of error 0.07. From the same data, find the margin of error of a 99% interval (z* = 2.576).
  2. A 95% interval (z* = 1.96) has margin of error 0.06. From the same data, find the margin of error of a 99% interval (z* = 2.576).
  3. A 95% interval (z* = 1.96) has margin of error 0.09. From the same data, find the margin of error of a 99% interval (z* = 2.576).

Summary card

Confidence level

z∗z^*: 1.645, 1.96, 2.576. Higher confidence, wider interval.

Watch out: the level describes the method over many samples.

4. Choosing a sample size

Warm-up

Three quick questions from earlier lessons.

Discover

A survey of 100 has margin of error 0.10. About how many people give a margin of 0.05?

  1. 400
  2. 200

Key idea

Plan the sample size before collecting data.

To get margin of error at most MEME for a proportion: n≥(z∗ME)2p(1−p)n \ge \left(\dfrac{z^*}{ME}\right)^2 p(1 - p), using a prior estimate of pp or p=0.5p = 0.5 (the safest choice), then round up.

Worked example

95% confidence, ME = 0.03, p=0.5p = 0.5.

≈4268.4\approx 4268.4
(1.96/0.03)².
≈1067.1\approx 1067.1
× 0.25.
n=1068n = 1068
Round up.

Your turn, guided

Your turn: with z∗=2z^* = 2, ME = 0.1, p=0.5p = 0.5: (2/0.1)2×0.25(2/0.1)^2 \times 0.25.

n=100n = 100
400 × 0.25.

Practice ★

  1. A survey of 264 people gives a margin of error you want to halve. About how many people are needed?
    1. 1056
    2. 528
    3. About half as many
  1. A margin of error is 0.08. If the sample size is multiplied by 9, what is the new margin of error?
  2. A margin of error is 0.07. If the sample size is multiplied by 25, what is the new margin of error?

Watch out!

Practice ★★

  1. Using p = 0.5 and z* = 1.96, find the value of n (before rounding up) needed for a margin of error of 0.04.

Exit ticket

Three questions to check you have got it.

  1. A margin of error is 0.08. If the sample size is multiplied by 9, what is the new margin of error?
  2. A margin of error is 0.07. If the sample size is multiplied by 25, what is the new margin of error?
  3. A margin of error is 0.07. If the sample size is multiplied by 4, what is the new margin of error?

Summary card

Sample size

n≥(z∗/ME)2p(1−p)n \ge (z^*/ME)^2 p(1 - p), p=0.5p = 0.5 if unknown; round up.

Watch out: halving ME needs 4 times the sample.

5. t intervals for a mean

Warm-up

Three quick questions from earlier lessons.

Discover

To estimate a mean we usually do not know σ, so we use the sample's ss. Does that add uncertainty?

  1. Yes: we use a slightly larger t critical value
  2. No: s is just as good as σ

Key idea

The one-sample t interval.

xˉ±t∗sn\bar{x} \pm t^*\dfrac{s}{\sqrt{n}}, with t∗t^* from the t distribution with n−1n - 1 degrees of freedom. Conditions: random sample; population roughly normal or nn large (about 30 or more), with no strong outliers for small nn.

Worked example

n=16n = 16, xˉ=50\bar{x} = 50, s=8s = 8, t∗=2.131t^* = 2.131 (15 df, 95%).

SE=2SE = 2
8/4.
ME=4.262ME = 4.262
2.131 × 2.
(45.738,54.262)(45.738, 54.262)
50 ± 4.262.

Your turn, guided

Your turn: n=9n = 9, s=6s = 6. The standard error.

22
6/√9.

Practice ★

  1. A random sample of 25 has standard deviation s = 16. With t* = 2.064 (24 df, 95%), find the margin of error for the mean.
  2. A random sample of 25 has standard deviation s = 13. With t* = 2.064 (24 df, 95%), find the margin of error for the mean.
  1. A one-sample t interval uses a sample of 5. How many degrees of freedom?

Watch out!

Practice ★★

  1. Why is a t critical value used for a confidence interval for a mean from a sample of 40?
    1. Because σ is estimated by s, which adds variability
    2. Because n is less than 1,000
    3. Because the data are skewed

Exit ticket

Three questions to check you have got it.

  1. A random sample of 25 has standard deviation s = 16. With t* = 2.064 (24 df, 95%), find the margin of error for the mean.
  2. A random sample of 25 has standard deviation s = 13. With t* = 2.064 (24 df, 95%), find the margin of error for the mean.
  3. A random sample of 25 has standard deviation s = 19. With t* = 2.064 (24 df, 95%), find the margin of error for the mean.

Summary card

t interval for μ

xˉ±t∗s/n\bar{x} \pm t^* s/\sqrt{n}, df =n−1= n - 1.

Watch out: t*, not z*, when σ is estimated.

6. Intervals for a difference of proportions or means

Warm-up

Three quick questions from earlier lessons.

Discover

A 95% interval for p1−p2p_1 - p_2 is (0.02, 0.10). What does it suggest about the two proportions?

  1. p1p_1 appears larger
  2. No difference

Key idea

Compare two groups with an interval for the difference.

(p^1−p^2)±z∗p^1(1−p^1)n1+p^2(1−p^2)n2(\hat{p}_1 - \hat{p}_2) \pm z^*\sqrt{\dfrac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \dfrac{\hat{p}_2(1 - \hat{p}_2)}{n_2}}; for means (xˉ1−xˉ2)±t∗s12n1+s22n2(\bar{x}_1 - \bar{x}_2) \pm t^*\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}. If 0 is in the interval, "no difference" is plausible.

Worked example

p^1=0.6\hat{p}_1 = 0.6, p^2=0.5\hat{p}_2 = 0.5, n1=n2=100n_1 = n_2 = 100.

SE=0.0049=0.07SE = \sqrt{0.0049} = 0.07
0.0024 + 0.0025.
ME≈0.137ME \approx 0.137
1.96 × 0.07.
(−0.037,0.237)(-0.037, 0.237): no convincing difference
0.1 ± 0.137 contains 0.

Your turn, guided

Your turn: variances of the two estimates are 0.0009 and 0.0016. The SE of the difference.

0.050.05
√0.0025.

Practice ★

  1. Two groups have sample means 90 and 58. What is the point estimate of μ₁ − μ₂?
  1. Independent samples of 100 give p̂₁ = 1/10 and p̂₂ = 6/10. Using z* = 1.96, find the margin of error for p₁ − p₂.
  2. Independent samples of 100 give p̂₁ = 3/10 and p̂₂ = 8/10. Using z* = 1.96, find the margin of error for p₁ − p₂.

Watch out!

Practice ★★

  1. A 95% interval for p₁ − p₂ is (−0.07, 0.08). What does it suggest?
    1. No convincing difference: 0 is a plausible value of p₁ − p₂
    2. p₁ is larger, since the upper end is positive
    3. It proves p₁ = p₂

Exit ticket

Three questions to check you have got it.

  1. Independent samples of 100 give p̂₁ = 1/10 and p̂₂ = 6/10. Using z* = 1.96, find the margin of error for p₁ − p₂.
  2. Independent samples of 100 give p̂₁ = 3/10 and p̂₂ = 8/10. Using z* = 1.96, find the margin of error for p₁ − p₂.
  3. Independent samples of 100 give p̂₁ = 7/10 and p̂₂ = 8/10. Using z* = 1.96, find the margin of error for p₁ − p₂.

Summary card

Intervals for differences

Estimate difference ± critical value × √(sum of variances).

Watch out: does the interval contain 0?