Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Sufficient statistic wikipedia , lookup
Foundations of statistics wikipedia , lookup
History of statistics wikipedia , lookup
Taylor's law wikipedia , lookup
Bootstrapping (statistics) wikipedia , lookup
Statistical inference wikipedia , lookup
German tank problem wikipedia , lookup
Resampling (statistics) wikipedia , lookup
Vanier College Quantitative Methods Chapter 21 Confidence Intervals In chapters 21 and 22 we will build upon the concepts introduced in chapters 3, 12, and 13. Specifically we will look at how the standard deviation helps us calculate a confidence interval. We will also see how a thorough understanding the relationship between mean, standard deviation, standard scores, percentiles (along with the 68-95-99.7 rule), as well as our general understanding of probability to help us formulate confidence intervals. Estimating Statistical inference makes conclusions about the population on the basis of sample data. Numbers that describe a population are parameters. To estimate a population parameter (which in practice is often unknown), we choose a sample from the population (reduce biasness by using an unbiased sampling method-SRS, Table of Random digits, etc,) and use the sample statistic-a number calculated from the sample-as your estimate for the population parameter. A basic move in statistical inference is to use a sample statistic to estimate a population parameter. 95% Confidence Interval A 95% confidence interval is an interval calculated from sample data that is guaranteed to capture the true population parameter in 95% of all samples. In this sense, a 95% confidence interval is the margin of error of a statistical study. The margin of error in a statistical study is used to describe the range of values likely to contain the population parameter. We find this range of values by adding and subtracting the margin of error from the sample statistic obtained in the study. That is, the range of values likely to contain the population parameter is: From: (sample statistic – margin of error) To: (sample statistic + margin of error) Generally speaking, statistics in a statistical study often take one of two forms: A proportion (i.e. a certain percentage of those surveyed that possess some characteristic that we want to measure) An average or mean Let’s look at these two types of statistics in some greater detail. We start off by looking at proportions. Estimating with confidence Let us first define what is meant by proportion. In simplistic terms, a proportion (denoted by the letter p ) essentially counts those individuals in the survey that have a successful measurement of what it is we want measured. For example, if we wanted to know the proportion of students at Vanier College who wear eye glasses, then those students who wear eye glasses would be counted as a “successful” measurement. Hence, we can denote a proportion as follows: p = “Successful” count N where N is the number of people in the population (since p is a population parameter). Chapter 21 1 Suppose we wanted to estimate the proportion ( p ) of the individuals in the population who have some characteristic. Since we normally do not know the value of the population proportion p , we must use sample data in order to infer about the value of this (unknown) population parameter. Consequently, let us define a sample proportion (which is a statistic). A sample proportion (denoted as p̂ the “hat” on the p means we’re looking at the sample) can be expressed in much the same was as the population proportion. Specifically, we denoted the sample proportion ( p̂ ) as follows: p̂ = count of successes in the sample n where n denotes the sample size, not the size of the population. Therefore we use the proportion p̂ of successes in a SRS to estimate the proportion p of successes in the population. Since we want to use our sample proportion p̂ to infer about the unknown population proportion p , we must ask ourselves how good is the statistic p̂ as an estimate of the parameter p ? To find out, we ask “ what would happen if we took many samples?” We know that p̂ would vary from sample to sample (we saw that idea in chapter 3…that’s the idea of variability). We also know that this sampling variability isn’t haphazard. It has a clear pattern in the long run, a pattern that is pretty much described by the normal curve (this is something we saw in chapter 13 since in the long run the pronounced effect of outliers is often “cancelled out”). As a result, in order to find out how good the statistic p̂ is as an estimate of the parameter p , we must first understand how the sample proportion ( p̂ ) is distributed. Sampling distribution of a sample proportion ( p̂ ) The sampling distribution of a statistic is the distribution of values taken by the statistic in all possible samples of the same size from the same population. Take a SRS of size n from a large population that contains proportion p of successes. Let p̂ be the sample proportion of successes: p̂ = count of successes in the sample n If the sample is large enough, then we know several things about the sampling distribution of a sample proportion p̂ . The sampling distribution of p̂ is approximately normal (assumption). This makes sense as if the sample is large enough, the pronounced effect of outliers dissipates. Hence with no pronounced effect of outliers, we assume that the sampling distribution of the sample proportion p̂ is approximately normal. This fact gives rise to two other points. Why? This is because we now know something about normal distributions. Specifically, they are completely described by giving their mean and standard deviation. The mean of the sampling distribution p̂ is p . This makes sense. After all, if the sample is getting large and larger, wouldn’t the sample size begin to approach the size of the population? As a result, wouldn’t the sample proportion p̂ (which is a statistic) begin to approach the (unknown) value of the population proportion (which is a parameter)? Hence if the sample is large, we would expect the sample statistic to converge on the population parameter. According to the law of large numbers (see chapter 20 p. 433), if a random phenomena with numerical outcomes is repeated many times (i.e. if n Chapter 21 2 increases), then the mean of the observed outcomes approaches the expected value. This is exactly what is happening here. As the sample size n increases, the sample statistic (the observed outcome of a random phenomena) would approach its expected value (the population proportion p ). Therefore the mean of the sampling distribution p̂ is p . The standard deviation of the sampling distribution is: p(1 p) n Therefore putting points 1, 2, and 3 together gives us the sampling distribution of the sample proportion p̂ : p̂ ~N [ p , p(1 p) ] n Good example: example #2 page 458-459 See Figure 21.1 Following the “logic” we used to derive an interval when we looked at the 68-95-99.7 rule (ch. 13), we will adopt that same idea here. Recall that the basic idea of an interval is “center ± spread around center”. Based on the sampling distribution of p̂ (see above), an approximate 95% confidence interval would be given as: p ±2 p(1 p) n Why the number “2” in front of the standard deviation p(1 p) ? Recall from chapter 13 that extending n 2 standard deviations of either side of a normal distribution represents (approx.) the central 95% of that distribution. Hence 2* p(1 p) forms the 95% confidence interval around the mean. n Is this the 95% confidence interval we want? No. The 95% confidence interval given above can be thought of as a theoretical result. Why? The interval can’t be found just from the data because the standard deviation of p̂ involves the population proportion p , and in practice we don’t know p . So what do we do? Well, what do you think we’ll do? Answer: we will use p̂ (something we know) and use that as our estimate of the (unknown) population proportion p . We know that when we take a large random sample, the statistic p̂ is almost always close to the (unknown) population parameter p . So we use p̂ as the “guessed” value of the unknown p . This is makes a bit of sense because we know that p̂ will approach the Chapter 21 3 value of our unknown population proportion p if the sample is very large. We are now in a position to properly give the 95% confidence interval for a proportion. 95% confidence interval for a proportion Choose a SRS of size n from a large population that contains an unknown proportion p of successes. Call the proportion of successes in the sample p̂ . An approximate 95% confidence interval for the population parameter p is: p̂ ± 2 pˆ (1 pˆ ) n See example 3 (Good example) page 461. Understanding Confidence Intervals Our 95% confidence interval for a population proportion p has the familiar form: estimate ± margin of error or statistic ± margin of error The “estimate” is really the center of the distribution (i.e. the mean since we assume the distribution is normal). From our understanding of the normal curve presented in chapter 13, the margin of error here is really based on two components: the number “2” represents the number of standard deviations one must go out from either side of the mean of the distribution in order to capture the central 95% of the distribution (i.e. the standard score Z). We then multiply that to the standard deviation of the sampling distribution of a sample proportion pˆ (1 pˆ ) . This product forms the 95% interval around the mean (hence the 95% n confidence interval). Confidence Interval A level C confidence interval for an unknown population parameter has two parts: • • An interval calculated from the data A confidence level C, which gives the probability that the interval will capture the true parameter value in repeated samples. Recall from chapter 3 that we can use any level of confidence (C) that we want, although the standard in statistics is to use a 95% level of confidence. We know from chapter 3 that a higher level of confidence results in a larger margin or error. This is the whole point of the 68-95-99.7 rule: the further out from the mean you extend, the higher the level of confidence and the larger the interval around the mean. Confidence intervals use the central idea of probability: ask what would happen if we repeated the sampling many times. The “95%” in a 95% confidence interval is a probability. Specifically, it’s the probability that the method produces an interval that does capture the true parameter. See example 4. Chapter 21 4 We know that each sample yields a new estimate p̂ , and hence a new confidence interval. If we sample forever, 95% of these intervals would capture the true parameter. This is true no matter what the true value of p is (see figure 21.3 below). Repeated samples from the same population give different 95% confidence intervals, but 95% of these intervals capture the true population proportion p. The 95% confidence intervals from 25 SRSs are shown above are the sampling distributions of p̂ , one after another. Recall that the sampling distribution of p̂ is assumed to be normal with a mean of p and a standard deviation of p(1 p) . The vertical line, therefore, represents p (the unknown population n Chapter 21 5 proportion). The central dots are the values of p̂ , the centers of the intervals (i.e. the mean or “estimate”). The arrows on either side span the confidence interval. In the long run, 95% of the intervals will cover the true p, and 5% will miss. Of the 25 intervals, 24 hit and 1 misses (the fifth confidence interval falls outside of the 95% confidence interval for p̂ ). Remember that probability describes only what happens in the long run-we don’t expect exactly 95% of 25 intervals to capture the true parameter. Remember that our interval is only approximately a 95% confidence interval. It isn’t exactly for two reasons: The sampling distribution of the sample proportion p̂ isn’t exactly normal (remember we assume it’s normal). Also, we don’t get the standard deviation of p̂ exactly right because we used p̂ in place of the unknown p . These difficulties go away as the sample size gets larger. Our method here is only good for large samples (at least 10 times the size of the sample). The method shown here shows how we get a confidence interval from the sampling distribution of a statistic. That’s the reasoning behind any confidence interval. Confidence intervals for a population proportion From chapter 3 we know that the higher the level of confidence, the larger the margin or error will be. Let’s see how. Confidence intervals for a population proportion Using a normal distribution, for any probability C between 0 and 1 (see chapter 17 on probabilities), there is a number z* such that any normal distribution has a probability C within z* standard deviations from the mean. The numbers z* are called the critical values of the normal distribution. Figure 21.5 shows how the probability C and the number z* are related. Think of z* as the number of standard deviations on either side of the mean one must extend to form the interval for a certain level of confidence C. Chapter 21 6 Table 21.1 on page 465 of your textbook shows that any normal distribution has a probability of 99% within ± 2.58 standard deviations from its mean. For a 95% probability it is 1.96 standard deviations from its mean. The 68-95-99.7 rule uses 2 in place of the critical value z* = 1.96 (not a bad approximation). From figure 21.5, we see that with probability C, the sample proportion p̂ takes a value within z* standard deviations of p . That is just to say that with probability C, the interval extending z* standard deviations on either side of the observed p̂ captures the unknown p . Using the estimated standard deviation of p̂ produces the following: Choose a SRS of size n from a population of individuals of which proportion p are successes. The proportion of successes in the sample is p̂ . When n is large, an appropriate level C confidence interval for p is: p̂ ± 1.96 pˆ (1 pˆ ) n where z* is the critical value for probability C. Since by convention we use a 95% level of confidence, z* is 1.96. Notice that because we use 1.96 instead of 2 (from the 68-95-99.7 rule), the confidence interval is slightly smaller although not by much. (See example 5) Compare example 5 with the calculation of the 95% confidence interval in example 3. The only difference is the use of the critical value 2.58 for 99% confidence in place of 2 for 95% confidence. That makes the margin of error (MOE) for 99% confidence larger and the confidence interval wider. Higher confidence isn’t free-you pay for it with a higher margin or error/wider confidence interval. To cover a higher percent of the area under the normal curve, we must go farther out from the center. Chapter 21 7