Theory
Confidence intervals and sample size
Intervals for means, proportions, and variances, comparisons between samples, and planning for a specified precision.
In Chapter 9 the mean of a sample was used as an estimate of the population mean. If 36 items from a production run are weighed and their mean is , the estimate of the mean mass of all the items is . Another group of 36 items would give a different mean, however, so the estimate equals only by chance. A confidence interval adds a margin to the estimate. If the standard deviation of the masses is , the 36 items give the interval . The rule that produces it, applied to many different samples, gives an interval containing in 95 cases out of 100.
This chapter computes intervals of this kind for the mean of a population, for a proportion, for a variance, and for the difference between two means. They answer questions such as “between which values does the percentage of students who take the bus lie?”. If 64 of 200 students interviewed take the bus, the estimate is and the interval runs from about to . The last section computes how much data to collect so that the margin does not exceed a value fixed before the survey, for example .
The calculations use results from earlier chapters. The normal, chi-square, and Student’s t distributions and their quantiles are in Chapter 6. The distribution of the sample mean, the standard error, and the central limit theorem are in Chapter 8. Chapter 11 uses the same calculations to decide between two hypotheses about a parameter, and Chapter 12 constructs intervals for the slope of a regression line and for a new observation.
Coverage and the observed interval
1. Confidence procedures
A normal population has standard deviation and unknown mean . Weigh 36 items, compute the sample mean , and take the interval from to . Before the weighing, is a random variable, so the two endpoints are also random and change from one sample to another. The theorem on the normal interval for the mean shows that the interval constructed in this way contains with probability , whatever the value of . After the weighing, with observed mean , the endpoints become the numbers and .
In general, the unknown parameter is denoted by , read theta; it may be, for example, a mean or a proportion . A random sample gives two statistics and , called the lower and upper endpoints. The probability that the random interval contains is the coverage probability at . A procedure has confidence level , where , read alpha, is a number with , if it guarantees
The subscript in indicates that the probability is computed assuming that the parameter equals . In the weighing example and the level is , that is, . The interval produced by a procedure with level is called a confidence interval at level .
If the coverage probability equals for every , the procedure has exact coverage equal to the level. For other procedures the coverage exceeds the level at some values of , as happens for the exact binomial interval in the section on proportions.
For a single interval, the coverage indicator equals if the interval contains and otherwise. With , the interval has indicator and the interval has indicator . Before the data are collected, the indicator is a Bernoulli variable, as in Chapter 5, and its expected value is the coverage probability. If sampling is repeated many times with the same rule, the fraction of intervals with indicator approaches the coverage probability, by the law of large numbers in Chapter 8. For a procedure with exact coverage, the level is therefore the value approached by the fraction of intervals that contain the parameter when the same rule is applied to many samples.
Coverage under repeated sampling
A laboratory measures the concentration of the same solution under controlled conditions and repeats series of measurements. In each series it computes an interval for the mean concentration with the same procedure. The number of intervals containing the mean concentration is the sum of the coverage indicators. If the assumptions of the procedure are satisfied and coverage is exact, each indicator has expected value , so by linearity of expectation the expected number of intervals containing the mean concentration is . In a particular sequence of series the observed count may differ, for example , because is the average count over many repetitions of the whole sequence. Coverage is therefore a property of the procedure, computed under its assumptions.
Ten intervals from the same procedure
A normal population has and . Ten independent samples, each of units, are drawn from it. The standard error of the mean, that is, the standard deviation of seen in Chapter 8, is . Each interval therefore has half-width, that is, distance from the center to each endpoint, equal to . The ten observed means are , , , , , , , , , and . The sixth interval is and excludes because . The other nine intervals contain , so nine coverage indicators out of ten equal . The centers vary from sample to sample, whereas the half-width stays the same because it depends only on , , and the confidence level.
Interpreting an observed interval
Suppose that an observed interval is and that the population parameter equals . The endpoints are now fixed numbers and the event is false, so it has probability . After the observation, the interval either contains the parameter or does not, so the statement “the parameter lies in with probability ” is wrong.
The probability refers to the random endpoints and before the data are collected. What can be said of the interval is that it was produced by a rule that gives an interval containing the parameter in of samples.
2. Pivotal quantities and lower-tail quantiles
In the weighing example, with and , consider the quantity
The quantity contains the data, through , and the unknown parameter . By the theorem “Mean and variance in a normal sample” in Chapter 8, has a standard normal distribution whatever the value of . The probability can therefore be computed without knowing . Solving the two inequalities for gives , which is the weighing rule.
A pivotal quantity is a function of the sample and the parameter of interest, such as , whose distribution is known and does not depend on unknown parameters.
Probabilities for the pivot are expressed through quantiles, defined in Chapter 6. For a continuous distribution with an increasing cumulative distribution function, the quantile of order is the value with probability to its left. For the standard normal, for example, the quantile of order is about , because . The symbols , , and denote the quantiles of order of the standard normal, Student’s t, and chi-square distributions, respectively, the three distributions defined in Chapter 6. The symbol , read nu, gives the degrees of freedom for the last two distributions. These quantiles are called lower-tail quantiles because is the probability to the left.
A two-sided interval has one endpoint on each side of the estimate. To construct an equal-tailed one, take the quantiles of orders and , which leave probability outside on the left and on the right. At , and the orders are and . The pivot falls between the two quantiles with probability . The probabilities are read from the distribution of the pivot; solving the two inequalities for the parameter gives the endpoints of the interval. The order of the endpoints depends on the form of the pivot. In the interval for the variance, for example, the larger quantile gives the lower endpoint.
Remark
A confidence interval for the mean concerns a fixed number, the population mean . A prediction interval, by contrast, is an interval that contains, with a specified probability, a new observation from the population, for example the mass of the next item weighed. It is constructed in Chapter 12, on regression.
With known standard deviation and independent measurements, the sample mean has standard deviation , and the interval for has half-width . A new weighing from the same population still has standard deviation . Even if were known exactly, of new weighings would fall between and , that is, in an interval of half-width . The prediction endpoints are therefore farther from the center than the confidence endpoints for the mean, because the variability of a single observation remains even when is known.
Mean with known standard deviation
Normal confidence interval for the mean
Let be independent observations with distribution , where and the standard deviation is known. The sample mean is . Writing , the interval
has exact coverage for . The quantity is the standard error of the mean. The product is the half-width of the interval, also called the margin; the width of the interval is twice the margin.
The theorem applies when the population standard deviation is known, for example from the specifications of a measuring instrument used for a long time. When is unknown, the t interval of the next section is used.
Proof
By the theorem “Mean and variance in a normal sample” in Chapter 8, the mean of independent normal observations has a normal distribution with mean and variance . The pivot therefore has a standard normal distribution. Since the standard normal is symmetric about , the quantile of order is , and
The denominator is positive, so multiplying both inequalities by keeps their direction and gives
Subtracting from all three parts gives . Multiplying by reverses the inequalities, hence
This event is equivalent to the one involving the pivot, so it has the same probability . The other proofs in the chapter solve the inequalities in the same way.
The quantile and the two tails
For a confidence level, and each tail has area . The positive quantile is . With , , and , the standard error is and the margin is , giving approximately . In the figure, , read phi of z, is the standard normal density, denoted by in Chapter 6. The central in the figure refers to the pivot, which is a number without units. The interval endpoints are expressed in the units of the mean, grams.
Remark
Consider independent and identically distributed observations, with finite known variance, from a nonnormal population. In this case the same formula has asymptotic coverage , that is, its coverage probability approaches as grows. The reason is the central limit theorem of Chapter 8, by which the distribution of approaches the standard normal as grows. For a fixed the coverage is not guaranteed, and its distance from the level depends on the shape of the population. With a strongly skewed population, such as waiting times, or with values far from the mean that have non-negligible probability, a sample of a few observations gives coverage far from the level.
Effect of sample size on the margin of error
With , , and , the standard error is and the half-width is . With the standard error is and the half-width becomes . Quadrupling has halved the half-width, because it has doubled . Two different samples give different observed means, so the two intervals have different centers; the relationship with concerns only the width, at a fixed confidence level and standard deviation.
For the same sample of observations, instead, the center remains the observed mean and only the quantile changes. Going from to , the quantile rises from to , the half-width from to , and the interval widens about the same mean.
End of the free preview
The theory of this topic continues with 7 more sections
- Mean with unknown standard deviation
- Binomial proportions
- Variance of a normal population
- Difference between two independent means
- Paired differences
- Sample size and one-sided bounds
- Keep studying
Full access also includes the other 7 worked examples of this topic and the solutions of the 14 practice exercises.
Unlock Statistics and probability · €49Read the first 3 worked examples in this chapter for free.