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
Chapter 8 Confidence Intervals McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Confidence Intervals 8.1 z-Based Confidence Intervals for a Population Mean: σ Known 8.2 t-Based Confidence Intervals for a Population Mean: σ Unknown 8.3 Sample Size Determination 8.4 Confidence Intervals for a Population Proportion 8.5 Confidence Intervals for Parameters of Finite Populations (Optional) 8.6 A Comparison of Confidence Intervals and Tolerance Intervals (Optional) 8-2 z-Based Confidence Intervals for a Mean: σ Known • The starting point is the sampling distribution of the sample mean – Recall that if a population is normally distributed with mean m and standard deviation σ, then the sampling distribution of x is normal with mean mx = m and standard deviation x n – Use a normal curve as a model of the sampling distribution of the sample mean • Exactly, because the population is normal • Approximately, by the Central Limit Theorem for large samples 8-3 The Empirical Rule • 68.26% of all possible sample means are within one standard deviation of the population mean • 95.44% of all possible observed values of x are within two standard deviations of the population mean • 99.73% of all possible observed values of x are within three standard deviations of the population mean 8-4 Example 8.1: The Car Mileage Case • Assume a sample size (n) of 5 • Assume the population of all individual car mileages is normally distributed • Assume the population standard deviation (σ) is 0.8 0.8 x 0.358 n 5 • The probability that x with be within ±0.7 of µ is 0.9544 8-5 Example 8.1 The Car Mileage Case Continued • Assume the sample mean is 31.3 • That gives us an interval of [31.3 ± 0.7] = [30.6, 32.0] • The probability is 0.9544 that the interval [x ± 2σ] contains the population mean µ 8-6 Example 8.1: The Car Mileage Case #3 • That the sample mean is within ±0.7155 of µ is equivalent to… • x will be such that the interval [x ± 0.7115] contains µ • Then there is a 0.9544 probability that x will be a value so that interval [x ± 0.7115] contains µ – In other words P(x – 0.7155 ≤ µ ≤ x + 0.7155) = 0.9544 – The interval [x ± 0.7115] is referred to as the 95.44% confidence interval for µ 8-7 Example 8.1: The Car Mileage Case #4 Three 95.44% Confidence Intervals for m • Thee intervals shown • Two contain µ • One does not 8-8 Example 8.1: The Car Mileage Case #5 • According to the 95.44% confidence interval, we know before we sample that of all the possible samples that could be selected … • There is 95.44% probability the sample mean is such the interval [x ± 0.7155] will contain the actual (but unknown) population mean µ – In other words, of all possible sample means, 95.44% of all the resulting intervals will contain the population mean µ – Note that there is a 4.56% probability that the interval does not contain µ • The sample mean is either too high or too low 8-9 Generalizing • In the example, we found the probability that m is contained in an interval of integer multiples of x • More usual to specify the (integer) probability and find the corresponding number of x • The probability that the confidence interval will not contain the population mean m is denoted by – In the mileage example, = 0.0456 8-10 Generalizing Continued • The probability that the confidence interval will contain the population mean m is denoted by 1 - – 1 – is referred to as the confidence coefficient – (1 – ) 100% is called the confidence level • Usual to use two decimal point probabilities for 1 – – Here, focus on 1 – = 0.95 or 0.99 8-11 General Confidence Interval • In general, the probability is 1 – that the population mean m is contained in the interval x z 2 x x z 2 n – The normal point z/2 gives a right hand tail area under the standard normal curve equal to /2 – The normal point - z/2 gives a left hand tail area under the standard normal curve equal to /2 – The area under the standard normal curve between -z/2 and z/2 is 1 – 8-12 Sampling Distribution Of All Possible Sample Means 8-13 z-Based Confidence Intervals for a Mean with σ Known • If a population has standard deviation (known), • and if the population is normal or if sample size is large (n 30), then … • … a (1-)100% confidence interval for m is x z 2 x - z 2 , x z 2 n n n 8-14 95% Confidence Level • For a 95% confidence level, 1 – = 0.95, so = 0.05, and /2 = 0.025 • Need the normal point z0.025 – The area under the standard normal curve between -z0.025 and z0.025 is 0.95 – Then the area under the standard normal curve between 0 and z0.025 is 0.475 – From the standard normal table, the area is 0.475 for z = 1.96 – Then z0.025 = 1.96 8-15 95% Confidence Interval • The 95% confidence interval is x z0.025 x x 1.96 n x - 1.96 , x 1.96 n n 8-16 99% Confidence Interval • For 99% confidence, need the normal point z0.005 – Reading between table entries in the standard normal table, the area is 0.495 for z0.005 = 2.575 • The 99% confidence interval is x z0.025 x x 2.575 n x - 2.575 , x 2.575 n n 8-17 The Effect of a on Confidence Interval Width z/2 = z0.025 = 1.96 z/2 = z0.005 = 2.575 8-18 Example 8.2: Car Mileage Case • Given – x = 31.56 – σ = 0.8 – n = 50 • Will calculate – 95 Percent confidence interval – 99 Percent confidence interval 8-19 Example 8.2: 95 Percent Confidence Interval x z0.025 0.8 31.56 1.96 n 50 31.56 0.222 31.34, 31.78 8-20 Example 8.2: 99 Percent Confidence Interval x z0.005 0.8 31.56 2.575 n 50 31.56 0.294 31.27, 31.85 8-21 Notes on the Example • The 99% confidence interval is slightly wider than the 95% confidence interval – The higher the confidence level, the wider the interval • Reasoning from the intervals: – The target mean should be at least 31 mpg – Both confidence intervals exceed this target – According to the 95% confidence interval, we can be 95% confident that the mileage is between 31.33 and 31.78 mpg • We can be 95% confident that, on average, the mean exceeds the target by at least 0.33 and at most 0.78 mpg 8-22 t-Based Confidence Intervals for a Mean: Unknown • If is unknown (which is usually the case), we can construct a confidence interval for m based on the sampling distribution of t x -m s n • If the population is normal, then for any sample size n, this sampling distribution is called the t distribution 8-23 The t Distribution • The curve of the t distribution is similar to that of the standard normal curve – Symmetrical and bell-shaped – The t distribution is more spread out than the standard normal distribution – The spread of the t is given by the number of degrees of freedom • Denoted by df • For a sample of size n, there are one fewer degrees of freedom, that is, df = n – 1 8-24 Degrees of Freedom and the t-Distribution As the number of degrees of freedom increases, the spread of the t distribution decreases and the t curve approaches the standard normal curve 8-25 The t Distribution and Degrees of Freedom • As the sample size n increases, the degrees of freedom also increases • As the degrees of freedom increase, the spread of the t curve decreases • As the degrees of freedom increases indefinitely, the t curve approaches the standard normal curve – If n ≥ 30, so df = n – 1 ≥ 29, the t curve is very similar to the standard normal curve 8-26 t and Right Hand Tail Areas • Use a t point denoted by t – t is the point on the horizontal axis under the t curve that gives a right hand tail equal to a – So the value of t in a particular situation depends on the right hand tail area a and the number of degrees of freedom • df = n – 1 • = 1 – a , where 1 – a is the specified confidence coefficient 8-27 t and Right Hand Tail Areas 8-28 Using the t Distribution Table • Rows correspond to the different values of df • Columns correspond to different values of a • See Table 8.3, Tables A.4 and A.20 in Appendix A and the table on the inside cover – Table 8.3 and A.4 gives t points for df 1 to 30, then for df = 40, 60, 120 and ∞ • On the row for ∞, the t points are the z points – Table A.20 gives t points for df from 1 to 100 • For df greater than 100, t points can be approximated by the corresponding z points on the bottom row for df = ∞ – Always look at the accompanying figure for guidance on how to use the table 8-29 Using the t Distribution • Example: Find t for a sample of size n=15 and right hand tail area of 0.025 – For n = 15, df = 14 – = 0.025 • Note that a = 0.025 corresponds to a confidence level of 0.95 – In Table 8.3, along row labeled 14 and under column labeled 0.025, read a table entry of 2.145 – So t = 2.145 8-30 Using the t Distribution Continued 8-31 t-Based Confidence Intervals for a Mean: Unknown • If the sampled population is normally distributed with mean m, then a (1)100% confidence interval for m is x t s 2 n • t/2 is the t point giving a right-hand tail area of /2 under the t curve having n1 degrees of freedom 8-32 Example 8.4 Debt-to-Equity Ratios • Estimate the mean debt-to-equity ratio of the loan portfolio of a bank • Select a random sample of 15 commercial loan accounts – x = 1.34 – s = 0.192 – n = 15 • Want a 95% confidence interval for the ratio • Assume all ratios are normally distributed but σ unknown 8-33 Example 8.4 Debt-to-Equity Ratios Continued • Have to use the t distribution • At 95% confidence, 1 – = 0.95 so = 0.05 and /2 = 0.025 • For n = 15, df = 15 – 1 = 14 • Use the t table to find t/2 for df = 14, t/2 = t0.025 = 2.145 • The 95% confidence interval: x t0.025 s 0.192 1.343 2.145 n 15 1.3433 0.1064 1.2369,1.4497 8-34 Sample Size Determination (z) If is known, then a sample of size z 2 n B 2 so that x is within B units of m, with 100(1-)% confidence 8-35 Sample Size Determination (t) If σ is unknown and is estimated from s, then a sample of size t 2 s n B 2 so that x is within B units of m, with 100(1-)% confidence. The number of degrees of freedom for the t/2 point is the size of the preliminary sample minus 1 8-36 Example 8.6: The Car Mileage Case • What sample size is needed to make the margin of error for a 95 percent confidence interval equal to 0.3? • Assume we do not know σ • Take prior example as preliminary sample – s = 0.7583 – z/2 = z0.025 = 1.96 – t/2 = t0.025 = 2.776 based on n-1 = 4 d.f. 8-37 Example 8.6: The Car Mileage Case Continued t / 2 s 2.7760.7583 n 49.24 50 0.3 E 2 2 8-38 Example 8.7: The Car Mileage Case • Want to see that the sample of 50 mileages produced a 95 percent confidence interval with a margin or error of ±0.3 s 0.798 x t0.025 n 31.56 2.010 50 31.56 0.227 31.33,31.79 • The margin of error is 0.227, which is smaller than the 0.3 desired 8-39