Finding the Sample Size
From MM*Stat International
The length of a confidence interval generally depends on the confidence level and on the sample size . An increase in the confidence level (keeping the sample size constant) yields a broader confidence interval. Increasing the sample size (while keeping the confidence level constant), enhances precision and yields a smaller interval. Hence by adjusting the confidence level and sample size, we may control the width of the confidence interval. Until now we have assumed that confidence level and sample size are given. In some applications, however, it is necessary to find the sample size which yields a confidence interval of pre-specified width at a confidence level . The problem will be illustrated using confidence intervals for a mean and a proportion . We will assume sampling with replacement from a large population.
(a) Confidence interval for
We assume that the population is normally distributed..The exact sample size can be found, if the length of the sample size is not random, i.e. does not depend on the data. This is true if the variance of the population is known. The length of the confidence interval for is given by: and depends on the confidence level as well as the sample size . If the length and the confidence level are given, we may solve the above equation for . More precisely, the required sample size is the smallest integer for which the condition holds: In order to obtain a confidence interval not exceeding length and confidence level , has to be as large as this integer. If the variance is unknown, the length of the interval for is random since it depends on the standard deviation which is a function of the sample. There are procedures which ensure that the expected length of the confidence interval equals some value, but these will not be considered here.
(b) Confidence interval for
Suppose we have a sufficiently large sample so that the sample proportion is approximately normally distributed. The length of the confidence interval for is given by Given a pre-specified value , and confidence level , we could solve the above equation for the required sample size. More precisely, the required sample size would be the smallest integer for which the following condition holds: However, note that is random, in which case the required sample size would vary from sample to sample. Fortunately, we can arrive at a conservative minimum sample size as follows. Note first that is maximal when and . This is the situation which requires, ceteris paribus, the largest sample size. Thus if we select then it will also be the case that for any other . We need to take some care to ensure that sample size is sufficiently large so that the normal distribution applies. We are given a population of employees of an insurance company and we observe the following variables: = annual income = number of signed contracts = sick days per calendar year = weekly working hours.We assume that the variables are normally distributed with unknown means and known variances for each variable:
How large does the sample size need to be so that the confidence interval for at a given confidence level is of length ? In this example one can assess the influence of sample size on the level and width of the confidence interval. We recommend that only one of these features be varied at a time. Please select
- the variable to be analyzed
- the length of the confidence interval
- the level of confidence (as decimal number, i.e. 0.95)
The leader of a small political party would like to know whether the party will receive more than 5% of the vote if the election were held tomorrow. He has appointed a statistician to perform the analysis. During their conversation the statistician highlights the following issues:
- In order to find the exact proportion of supporters, one would have to ask all the voters (i.e. the whole population).
- The proportion of votes in the sample is but an estimate or approximation of the true proportion.
- The confidence interval provides a measure of the uncertainty associated with the estimate.
- The length and level of confidence may be chosen by the politician .
- The shorter the required interval and the higher the confidence level, the larger the sample size.
The statistician calculates the required sample size using Since is unknown, the statistician uses the largest imaginable proportion of votes for his party. That proportion is 10 %. (This is because increases with .) This yields a conservative value for minimum sample size. The Bimmelbahn Corporation would like to make a statement about the timeliness of its trains, in particular, the average delay and the proportion of timely trains. Confidence interval based on a random sample will be used. 1. Question: What should be the sample size in order to find a confidence interval for mean delay at a confidence level and width 60 min ?We assume that the random variable = duration of delays is normally distributed with mean and known variance . We want a confidence interval for . Note that . Hence the required sample size is Thus if , the confidence interval will have the desired precision and width. 2. Question: What should be the sample size in order in order that the confidence interval for (the proportion of timely trains), be of length not exceeding 0.1 at a confidence level ?We assume the normal approximation holds for the distribution of (rule of thumb: ). Note that . We need to find to satisfy A conservative bound for minimum sample size may be obtained by setting . We obtain: Thus to achieve the desired width and confidence level, we need .