Math Core

Lesson 7.2 · Inference for Means

Confidence intervals for a mean

How long does a typical phone battery last on a full charge? What is the average commute time for workers in your city? Questions like these ask about a population mean μ\mu. In this lesson you'll use a random sample and the tt-distributions to build an interval of plausible values for μ\mu, and you'll learn to check that the method is trustworthy.

The one-sample t interval

Every confidence interval in AP Statistics has the same shape:

point estimate±margin of error,margin of error=(critical value)⋅(standard error).\text{point estimate} \pm \text{margin of error}, \qquad \text{margin of error} = (\text{critical value}) \cdot (\text{standard error}).

For a population mean, the point estimate is xˉ\bar{x}, the standard error is sn\dfrac{s}{\sqrt{n}}, and the critical value comes from a tt-distribution with n−1n - 1 degrees of freedom.

One-sample t interval for a mean

When the conditions are met, a level CC confidence interval for a population mean μ\mu is

xˉ±t∗sn,\bar{x} \pm t^* \frac{s}{\sqrt{n}},

where t∗t^* is the critical value for the middle area CC of the tt-distribution with df=n−1df = n - 1.

Here are the critical values you'll need in this lesson.

dfdf90% (t∗t^*)95% (t∗t^*)99% (t∗t^*)
71.8952.3653.499
91.8332.2623.250
111.7962.2013.106
151.7532.1312.947
241.7112.0642.797
291.6992.0452.756
401.6842.0212.704
z∗z^*1.6451.9602.576

Checking the conditions

The formula only gives an honest confidence level when three conditions hold.

  1. Random: The data come from a random sample from the population of interest, or from a randomized experiment.
  2. 10% condition: When sampling without replacement, n≤0.10Nn \le 0.10N, where NN is the population size. This keeps observations close enough to independent.
  3. Normal/Large Sample: The population distribution is approximately normal, or the sample size is large (n≥30n \ge 30). If nn is less than 30 and you don't know the population shape, graph the sample data (a dotplot, boxplot or histogram) and check that there is no strong skewness and no outliers.

The third condition is about the sampling distribution of xˉ\bar{x}. For large samples, the central limit theorem makes it approximately normal no matter the population shape. For small samples, you need evidence that the population itself isn't badly skewed, and the sample data are your only evidence.

Common mistake

The Normal/Large Sample condition is about the population (or the sampling distribution), not about the sample being perfectly bell-shaped. With n=10n = 10, a dotplot that's roughly symmetric with no outliers is fine. Don't say "the sample is normal," and don't skip the graph when n<30n < 30: the AP exam expects you to say what you looked at.

The four-step process

AP free-response questions reward a complete, organized answer. Use State, Plan, Do, Conclude.

  • State: the parameter (in context) and the confidence level.
  • Plan: name the procedure (one-sample tt interval for μ\mu) and check conditions.
  • Do: compute the interval, showing dfdf, t∗t^* and the standard error.
  • Conclude: interpret the interval in context.

Worked example: A complete interval

A company tests a random sample of 2525 of its new phone batteries. The batteries last a mean of xˉ=48.2\bar{x} = 48.2 hours with standard deviation s=6.5s = 6.5 hours. A dotplot of the data shows no strong skewness and no outliers. Construct and interpret a 95% confidence interval for the mean life of all batteries of this type.

State. We want to estimate μ\mu, the true mean battery life (hours) of all batteries of this type, with 95% confidence.

Plan. One-sample tt interval for μ\mu.

  • Random: the batteries are a random sample.
  • 10%: 2525 is less than 10% of all batteries produced.
  • Normal/Large Sample: n=25<30n = 25 < 30, but the dotplot shows no strong skewness or outliers.

Do. df=24df = 24, so t∗=2.064t^* = 2.064. The standard error is 6.525=1.3\dfrac{6.5}{\sqrt{25}} = 1.3.

48.2±2.064(1.3)=48.2±2.683=(45.517, 50.883).48.2 \pm 2.064(1.3) = 48.2 \pm 2.683 = (45.517,\ 50.883).

Conclude. We are 95% confident that the interval from about 45.545.5 to 50.950.9 hours captures the true mean battery life for all batteries of this type.

Interpreting the interval and the confidence level

These two ideas get confused all the time, so keep them separate.

  • The interval: "We are CC% confident that the interval from ___ to ___ captures the true mean ___ (in context)."
  • The confidence level: "If we took many random samples of the same size and built a CC% interval from each, about CC% of those intervals would capture the true mean."

The confidence level describes the method, not any single interval. Once the interval is computed, it either contains μ\mu or it doesn't. You just don't know which.

Common mistake

A confidence interval for a mean says nothing about individual values. "95% of batteries last between 45.5 and 50.9 hours" is wrong. The interval is about the population mean, and individual batteries vary far more than the mean does.

Working from raw data

On the exam you may be given the data rather than the summary statistics.

Worked example: Starting from data

A random sample of 88 students at a large school reported the number of minutes they spent on homework last night:

31, 27, 35, 29, 33, 38, 26, 3231,\ 27,\ 35,\ 29,\ 33,\ 38,\ 26,\ 32

A dotplot shows no outliers or strong skew. Find a 95% confidence interval for the mean homework time of all students at the school.

Solution. Using a calculator, xˉ=31.375\bar{x} = 31.375 minutes and s≈4.033s \approx 4.033 minutes. With df=7df = 7, t∗=2.365t^* = 2.365. The standard error is 4.0338≈1.426\dfrac{4.033}{\sqrt{8}} \approx 1.426.

31.375±2.365(1.426)≈31.375±3.372=(28.00, 34.75).31.375 \pm 2.365(1.426) \approx 31.375 \pm 3.372 = (28.00,\ 34.75).

We are 95% confident that the true mean homework time for students at this school is between about 28.028.0 and 34.734.7 minutes. (Technology's TInterval gives the same result.)

What controls the width

The margin of error is t∗⋅snt^* \cdot \dfrac{s}{\sqrt{n}}, so:

  • Higher confidence means a larger t∗t^* and a wider interval.
  • Larger sample size means a smaller standard error (and slightly smaller t∗t^*), so a narrower interval. To cut the margin of error in half, you need about four times as many observations.
  • More variability in the data (larger ss) means a wider interval.

Choosing a sample size

Before collecting data, you can choose nn to get a desired margin of error MEME. Since you don't have ss yet, use a reasonable guess for σ\sigma (from a pilot study or past data) and z∗z^* in place of t∗t^*:

z∗σn≤ME.z^* \frac{\sigma}{\sqrt{n}} \le ME.

Worked example: Planning a study

A nutritionist wants to estimate the mean sodium content of a brand's frozen dinners to within 33 milligrams with 95% confidence. Past data suggest σ≈15\sigma \approx 15 mg. How many dinners should she sample?

Solution. Solve 1.9615n≤31.96 \dfrac{15}{\sqrt{n}} \le 3:

n≥1.96(15)3=9.8,n≥96.04.\sqrt{n} \ge \frac{1.96(15)}{3} = 9.8, \qquad n \ge 96.04.

Always round up: she needs n=97n = 97 dinners.

Tip

Given an interval (L,U)(L, U), you can recover its pieces: xˉ=L+U2\bar{x} = \dfrac{L + U}{2} is the midpoint and ME=U−L2ME = \dfrac{U - L}{2} is half the width.

Practice

Practice 1

A random sample of 3030 observations has xˉ=64.5\bar{x} = 64.5 and s=9.8s = 9.8. The conditions for inference are met. Find a 99% confidence interval for μ\mu. Enter the lower and upper endpoints, separated by a comma, to 2 decimal places.

Separate answers with commas, e.g. 2, -5

Practice 2

A random sample of 1616 light bulbs has a standard deviation of s=8s = 8 hours. What is the margin of error for a 90% confidence interval for the mean lifetime?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

A 95% confidence interval for the mean weight (in ounces) of a brand of cereal boxes is (12.4, 15.8)(12.4,\ 15.8). What was the sample mean?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

A random sample of drivers gave a 95% confidence interval for the mean commute time in a city of (22.4, 27.9)(22.4,\ 27.9) minutes. Which is a correct interpretation?

Practice 5

A biologist measures the length of 1212 randomly selected fish from a lake. A dotplot shows that 1111 fish are between 2020 and 2828 cm and one fish is 6161 cm. Is a one-sample tt interval appropriate for estimating the mean length of fish in the lake?

Practice 6

A researcher computes a 95% confidence interval for a mean from a random sample of 5050 people. Which change would produce a narrower interval, assuming ss stays about the same?

Practice 7

A city planner wants to estimate the mean number of minutes residents wait for a bus to within 22 minutes with 99% confidence. A pilot study suggests σ≈12\sigma \approx 12 minutes. What is the smallest sample size that will do the job?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

A random sample of 1010 adults at a gym reported how many hours they slept before a morning workout: 4.2,5.1,3.8,4.7,5.5,4.0,4.9,4.4,5.2,4.64.2, 5.1, 3.8, 4.7, 5.5, 4.0, 4.9, 4.4, 5.2, 4.6. A dotplot shows no strong skew or outliers. Construct a 90% confidence interval for the mean sleep time of all such gym members. Enter the endpoints to 2 decimal places, separated by a comma.

Separate answers with commas, e.g. 2, -5