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 5. Inferences about Population Central Values Estimation versus Hypothesis Testing • Estimation – Information from the sample is used to estimate the parameters of population. • Hypothesis testing – Information from the sample is used to determine whether the parameters of population is greater, equal or less than a certain value. Estimation of µ (1) • Point estimation – To compute a single value (statistic) from the sample to estimate a population parameter. – Point estimator • The formula for calculating specific point estimates from sample data. • For most situations, we will use sample mean as a point estimate of µ. From the Central Limit Theorem for the sample mean, we know that for large n (crudely, n ≥ 30), y will be approximately normally distributed, with a mean µ and a standard error σ y . Estimation of µ (1) • Level of confidence – When the value of y is reported, we should also provide an indication of how accurately y estimate µ. We will accomplish this by considering an interval of possible values for µ in place of using just a single value y. – According to the Central Limit Theorem, the probability of y falling in the interval µ ± 1.96σ y is 0.95, so state that y ± 1.96σ y is an interval estimate of µ with level of confidence 0.95. This interval is called the 95% confidence interval of y . 0.2 0.1 y − 1.96σ y y + 1.96σ y Observed y 0.0 Probability 0.3 0.4 Confidence Interval µ − 1 .96 σ y µ µ + 1.96σ y Confidence Coefficient • The evaluation of the goodness of an interval estimation procedure is examining the fraction of times in repeated sampling that interval estimates would encompass the parameter to be estimated. This fraction is called confidence coefficient. • The interval y ± 1.96σ y is constructed by setting up the confidence coefficient 0.95. Thus, 95% of the time in repeated sampling intervals will contain the mean µ. Example 5.1 • • A study was conducted to determine the percent calories from fat in the diet of a population of women. The Food frequency questionnaire (FFQ) which uses a carefully designed series of questions to determine the dietary intakes of participants in the study. A sample of 168 women who represented a random sample from a population of female nurses completed a single FFQ. From the information gather from the questionnaire, the percentage of calories from fat (PCF) was computed. The procedure for constructing the confidence interval for µ requires that the sample size be reasonably large or that the population distribution to have a normal distribution. Please construct the normal probability plot to see whether the population distribution is really a normal distribution. Answer Confidence Interval for µ • A general formula for a confidence interval for µ with a confidence coefficient of (1-α), where α is between 0 and 1, is: 100 ⋅ (1 − α )% C.I. = y ± zα 2σ y where σ y = σ • • n The quantity zα 2 is a value of z having a tail area of α/2 to its right. In practice, it is difficult to find situations which the population standard deviation is known. Usually both the mean and the standard deviation must be estimated from the sample. Because σ is estimated by the sample standard deviation s, the actual standard error of the mean, σ n , is naturally estimated by s n . Choosing the Sample Size for Estimating µ (1) • There are two considerations in determining the appropriate sample size for estimating µ using a confidence interval. – First, the tolerable error establishes the desired width of the interval. – The second consideration is the level of confidence. • To obtain a confidence interval having a narrow width and a high level of confidence may require a large value for the sample size and hence be unreasonable in terms of cost and/or time. • In most situation, the confidence level is set at 95% or 90%, partly because of tradition and partly because these levels represent a reasonable level of certainty. Choosing the Sample Size for Estimating µ (2) • Suppose we want to estimate µ using a 100(1-α)% confidence interval having tolerable error W. Our interval will be of the form y ± E , where E=W/2. Note that W is the width of the confidence interval. To determine the sample size n, we solve the equation: σ E = zα / 2σ y = zα / 2 n • This formula for n is: ( zα / 2 ) 2 σ 2 n= E2 – Employ information from a prior experiment to calculate a sample variance s2. This value is used to approximate σ2. – Use information on the range of the observations to obtain an estimate of σ. Example 5.2 • A federal agency has decided to investigate the advertised weight printed on cartons of a certain brand of cereal. The company in question periodically samples cartons of cereal coming off the production line to check their weight. A summary of 1500 of the weights made available to the agency indicates a mean weight of 11.80 ounces per carton and a standard deviation of 0.75 ounce. Use this information to determine the number of cereal cartons the federal agency must examine to estimate the average weight of cartons being produced now, using 99% confidence interval of width 0.50. • Answer Statistical Testing or Hypothesis Testing (1) • In hypothesis testing, there is a preconceived idea about the value of the population parameter. • Research hypothesis versus null hypothesis – The hypothesis being proposed by the person conducting the study is called the research hypothesis or alternative hypothesis. – The negation of the research hypothesis is called null hypothesis. – The goal of the study is to decide whether the data tend to support the research hypothesis. Statistical Testing or Hypothesis Testing (2) • A statistical test is based on the concept of proof by contradiction and is composed of the five parts list below: – – – – – Research hypothesis or alternative hypothesis denoted by Ha. Null hypothesis, denoted by H0. Test statistics, denoted by T.S. Rejection region, denoted by R.R. Check assumptions and draw conclusions Statistical Testing for µ • The statement that µ equals to a specific value will always be included in H0. The particular value specified for µ is called its null value and is denoted µ0. • The statement about µ that the researcher is attempting to support or detect with the data from the study is the research hypothesis, Ha. • The negation of Ha is the null hypothesis, H0. • The null hypothesis is presumed correct unless there is overwhelming evidence in the data that the research hypothesis is supported. Test Statistic • The decision to state whether or not the data support the research hypothesis is based on a quantity computed from the sample data called the test statistic. • For example, a test statistic for µ is of y . z= y−µ σ n y or some function Rejection Region (1) • The rejection region contains the values of y that support the research hypothesis and contradict the null hypothesis, hence the region of values for y that reject the null hypothesis. • The rejection region will be the values of null distribution. y in the upper tail of the 0.0010 0.0005 Contradictory values of y 0.0000 Probability 0.0015 Rejection Region (2) Acceptance region µ = 520 Rejection region Type I and II Errors (1) • Type I error – To reject the null hypothesis when it is true. – The probability of a Type I error is denoted by the symbol α. • Type II error – To accept the null hypothesis when it is false. – The probability of a Type II error is denoted by the symbol β. Type I and II Errors (2) Null Hypothesis Decision True Reject H0 Type I error Accept H0 False Correct α 1-β Correct Type II error 1-α β Level of Significance • The decision as to which values go into the rejection region and which ones go into the non-rejection region is made on the basis of the desired level of significance, designated by α. • The weight of evidence for rejecting the null hypothesis is called the p-value. – The probability of obtaining a value of the test statistic that is as likely or more likely to reject H0 as the actual observed value of the test statistic. This probability is computed assuming that the null hypothesis is true. One and Two Tailed Tests • When the rejection region is located in only one tail of the distribution of y , the statistical test is called an one-tailed test. (H0: µ < or ≥ a certain value) • When the rejection region is located in both tails of the distribution of y , the statistical test is called a twotailed test. (H0: µ = or ≠a certain value) Example 5.3 • A corporation maintains a large fleet of company cars for its salespeople. To check the average number of miles driven per month per car, a random sample of n = 40 cars is examined. The mean and standard deviation for the sample are 2752 miles and 350 miles, respectively. Records for previous years indicate that the average number of miles driven per car per month was 2600. Use the sample data to test the research hypothesis that the current mean µ differs from 2600. Set α = 0.05 and assume that σ can be estimated by s. • Answer Example 5.4 • A city manager audits the parking tickets issued by city parking officers to determine the number of tickets that were contested by the car owner and found to be improperly issued. In past years, the number of improperly issued tickets per officer had a normal distribution with mean µ=380 and σ=35.2. Because there has recently been a change in the city’s parking regulations, the city manager suspects that the mean number of improperly issued tickets has increased. An audit of 50 randomly selected officers is conducted to test whether there has been an increase in improperly tickets. Use the sample data given here and α=0.01 to test the research hypothesis that the mean number of improperly issued tickets is greater than 380. The audit generates the following data: n = 50 and y =390. • Answer Computation of β • β – The probability of a Type II error – The probability of incorrectly accepting the null hypothesis • Operational characteristic curve (OC curve) – The value of β for a number of values of µ in the alternative hypothesis Ha and plot β versus µ in a graph called the OC curve. • Power – Tests of hypotheses are evaluated by computing the probability that the test rejects false null hypotheses. – Power = 1 - β – Power curve : the plot of power versus the value of µ The Probability β (1) Acceptance region Distributi on of y Distributi on of y under µ 0 under µ a 0.000 0.005 0.010 0.015 0.020 0.025 • β when µ0 = 410 350 375 380 420425 400 2 .0 σ y 450 The Probability β (2) 0.025 • β when µ0 = 395 Distributi on of y under µ 0 Distribution of y under µ a 0.000 0.005 0.010 0.015 0.020 Acceptance region 350 375 380 395 400 2.0σ y 425 450 The Probability β (3) Acceptance region Distributi on of y under µ 0 Distribution of y under µ a 0.000 0.005 0.010 0.015 0.020 0.025 • β when µ0 = 435 350 380 400 2.0σ y 435 450 500 The Probability β (4) • The probability of a Type II error decreases (and hence power increases) the further µ lies away from the hypothesized means under H0. • For one-tailed test (H0: µ ≤ µ0 or H0: µ ≥ µ0 ), the value of β at µa is the probability that z is less than zα − | µ0 − µ a | σ y . µ0 − µ a β ( µ a ) = p[ z < zα − ] σy β ( µ a ) : the probability of a Type II error if the actual value of the mean is µ a µ 0 : the null value of µ µ a : the actual value of the mean in H a The Probability β (5) • For two-tailed test (H0: µ = µ0 ), the value of β at µa can be calculated as the following: µ0 − µa β ( µ a ) ≈ p[ z < zα 2 − ] σy β ( µ a ) : the probability of a Type II error if the actual value of the mean is µ a µ 0 : the null value of µ µ a : the actual value of the mean in H a Example 5.5 • • • Prospective salespeople for an encyclopedia company are now being offered a sales training program. Previous data indicate that the average number of sales per month for those who do not participate in the program is 33. To determine whether the training program is effective, a random sample of 35 new employees us given the sales training and then sent out into the field. One month later, the mean and standard deviation for the number of sets of encyclopedias sold are 35 and 8.4, respectively. Do the data present sufficient evidence to indicate that the training program enhances sales? (use α = 0.05) Suppose that the encyclopedia company thinks that the cost of financing the sales program will be offset by increased sales if those in the program average 38 sales per month. Compute β for µa = 38 and, based on the value β(38), indicate whether you would accept the null hypothesis. Answer 0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000 Probability of Type II Error OC Curve (1) n = 10 n = 18 n = 25 84.00 84.25 84.50 84.75 85.00 Mean 85.25 85.50 85.75 86.00 0.9 1.0 OC Curve (2) 0.7 0.6 α = 0.01 0.1 0.2 0.3 0.4 0.5 α = 0.05 0.0 Probability of Type II Error 0.8 α = 0.001 84.00 84.25 84.50 84.75 85.00 Mean 85.25 85.50 85.75 86.00 0.9 1.0 OC Curve (3) 0.8 α = 0.05 0.6 0.1 0.2 0.3 0.4 0.5 α = 0.001 0.0 Power 0.7 α = 0.01 84.00 84.25 84.50 84.75 85.00 Mean 85.25 85.50 85.75 86.00 Choosing the Sample Size for µ (1) • The information required for determining the sample size for a statistical test about µ is: – the value of α – the value of µ in the alternative, that is, µ1 – the value of β(µ1 ), that is, β. • For any value of µ larger than µ1 , the sample size necessary to meet the requirements with a predetermined αand β is: – One-sided test n= ( zα + z β ) 2 σ 2 ∆2 ∆ = µ1 − µ 0 Choosing the Sample Size for µ (2) – For two-sided test n= ( zα / 2 + z β ) 2 σ 2 ∆2 ∆ = µ − µ0 • If is σ2 unknown, substitute an estimated value to get an approximate sample size. Example 5.6 • • A cereal manufacturer produces cereal in boxes having a labeled weight of 12 ounces. The boxes are filled by machines that are set to have a mean fill per box of 16.37 ounces. Because the actual weight of a box filled by these machines has a normal distribution with a standard deviation approximately 0.225 ounces, the percentage of boxes having weight less than 16 ounces is 5% using this setting. The manufacturer is concerned that one of its machines is underfilling the boxes and wants to sample boxes from the machine’s output to determine whether the mean weight µ is less than 16.37 with α = 0.05. If the true mean weight is 16.27 or less, the manufacturer needs the probability of falling to detect this underfilling of the boxes with a probability of at most 0.01, or risk incurring a civil penalty from state regulators. Thus, we need to determine the sample size n such that our test of H0 versus Ha has α = 0.05 and β(µ) less than 0.01 whenever µ is less than 16.27 ounces. Answer Example 5.7 • Refer to example 5.4 • Determine the p-value for the statistical test and reach a decision concerning the research hypothesis using α=0.01. • If the present value of α is 0.05 instead of 0.01, is your decision concerning Ha change? • Answer Inferences about µ for a Normal Population, σ Unknown (1) • Gosset’s finding – When the σ is replaced by s for small sample sizes, the test statistic z= y − µ0 σ n falsely rejecting the null hypothesis H0: µ = µ0 at a slightly higher rate than that specified by α. – He derived the distribution and percentage points of the test statistic y − µ0 s n for n < 30. Inferences about µ for a Normal Population, σ Unknown (2) • Student’s t y − µ0 t= s n – This quantity from the equation above is called t statistic and its distribution is called the Student’s t distribution or simply, Student’s t. Inferences about µ for a Normal Population, σ Unknown (3) 0.4 • Comparison of two t distribution and a standard normal distribution 0.2 0.1 0.0 Probability 0.3 Normal distribution t distribution, df = 5 t distribution, df = 10 -6 -4 -2 0 y 2 4 6 Properties of Student’s t Distribution • • • • • • There are many different t distributions. We specify a particular one by a parameter called the degrees of freedom (df). The t distribution is symmetrical about 0 and hence has mean equal to 0, the same as the z distribution. The t distribution has variance df/(df-2), and hence is more variable than the z distribution, which has variance equal to 1. As the df increases, the t distribution approaches the z distribution. (Note that as df increases, the variance df/(df-2) approaches 1.) Thus, with y − µ0 t= s n We conclude that t has a t distribution with df = n-1, and, as n increases, the distribution of t approaches the distribution of z. Special Concerns to Student’s t Distribution (1) • Degrees of freedom are pieces of information for estimating σ using s. The standard deviation s for a sample of n measurements is based on the deviations yi − y . Because∑ ( yi − y ) = 0 always, if n-1 of the deviations are known, the last (nth) is fixed mathematically to make the sum equal to 0. Thus, in a sample of n measurements there are n – 1 pieces of information (degrees of freedom). • A second method of explaining degrees of freedom is to recall that σ measures the dispersion of the population values about µ, so prior to estimating σ we must first estimate µ. Hence, the number of pieces of information (degrees of freedom) in the data can be used to estimate σ is n-1, the number of original data values minus the number of parameters estimated prior to estimating σ. Special Concerns to Student’s t Distribution (2) • The t test (rather than z test ) should be used any time σ is unknown and the distribution of y values is bell-shaped. • The probability of Type II error is dependent on three quantities, df = n-1, α and the difference between µa and µ0 in σ units. • The confidence interval for µwith σ unknown is identical to the corresponding confidence interval for µ when σ is known, with z replaced by t and σ replaced by s. s n Note : df = n - 1 and the confidence coefficient is (1 - α ). C.I . = y ± tα 2 Example 5.8 • A massive multistate outbreak of food-borne illness was attributed to Salmonella enteritidis. Epidemiologists determined that the source of the illness was ice cream. They sampled nine production runs from the company that had produced the ice cream to determine the level of Salmonella enteritidis in the ice cream. These levels (MPN/g) are as follows: 0.593 0.142 0.329 0.691 0.231 0.793 0.519 0.392 0.418 Use these data to determine whether the average level of Salmonella enteritidis in the ice cream is greater than 0.3 MPN/g a level that is considered to be very dangerous. Set α = 0.01. • Answer Influence of Nonnormality on t test (1) • A simulation study of the effect of skewness and heavy-tailedness on the level and power of the t test yielded the results. Population Distribution 0 n = 10 n = 15 n = 20 Shift d Shift d Shift d 0.2 0.6 0.8 0 0.2 0.6 0.8 0 0.2 0.6 0.8 Normal 0.050 0.145 0.534 0.754 0.050 0.182 0.714 0.903 0.050 0.217 0.827 0.964 Heavy Tailed 0.035 0.104 0.371 0.510 0.049 0.115 0.456 0.648 0.045 0.163 0.554 0.736 Light Skewness 0.025 0.079 0.437 0.672 0.037 0.129 0.614 0.864 0.041 0.159 0.762 0.935 Heavy Skewness 0.007 0.055 0.277 0.463 0.006 0.078 0.515 0.733 0.011 0.104 0.658 0.873 Influence of Nonnormality on t test (2) • Because t procedures have reduced power when sampling from skewed populations with small sample sizes, robust methods have been developed that are not affected by the skewness or extreme heavy-tailedness of the population distribution. • Two robust methods, the sign test and Wilcoxon signed test, can be used when the t test is not appropriate. Inferences about the Median Homework • • • • • 5.52 (p.239) 5.88 (p.255) 5.95 (p.257) 5.101(p.259) 5.112 (p.260) Answer to Example 5.1 50 s = 6.73 6.73 = 36.92 ± 1.02 168 30 40 95% C.I. = 36.92 ± 1.96 ⋅ 20 Percentage Of Calories from Fat (PCF) y = 36.92 -2.00 -1.50 -1.00 -0.50 0.00 0.50 1.00 Quantiles of Standard Normal 1.50 2.00 Answer to Example 5.2 W = 2 E = 0.5, E = 0.25 n= zα 2 ⋅ σ 2 E2 2.582 0.752 = = 59.91 ≈ 60 2 0.25 Answer to Example 5.3 H 0 : µ = 2600 H a : µ ≠ 2600 ∴ p − value < 0.05 (In fact, p − value = 0.00596) 0.0010 0.0008 0.0006 0.0004 40 α = 0.025 α = 0.025 0.0002 n z > 1.96 f (y) 0.0000 α = 0.05 y − µ 2752 − 2600 z= = = 2.75 350 σ 1500 2000 2500 3000 µ=2600 3500 4000 Answer to Example 5.4 H 0 : µ ≤ 380 H a : µ > 380 α = 0.01 y−µ 390 − 380 10 = = = 2.01 T .S . : z = 35.2 σ 4.979 50 n Critical point : zα =0.01 = 2.33 z = 2.01 < 2.33, accept H 0 . Conclusion : The number of improperly issued parking tickets has not increased. Answer to Example 5.4 0.004 0.006 0.008 0.010 f (y) 0.000 0.002 α = 0.01 300 400 µ = 380 500 2.33σ y Answer to Example 5.5 (1) H 0 : µ ≤ 33 H a : µ > 33 α = 0.01 y − µ0 35 − 33 2 T .S . : z = = = = 1.41 8.4 σ 1.42 n 35 Critical point : zα =0.05 = 1.645 z = 1.41 < 1.645, accept H 0 . Conclusion : Persons in the sales program have the same or a smaller mean number of sales per month as those not in the program. Answer to Example 5.5 (2) ⎡ µ0 − µa β (38) = P ⎢ z ≤ z0.05 − σy ⎢⎣ ⎡ ⎤ ⎤ 33 − 38 ⎥ ⎢ ⎥ = P ⎢ z ≤ 1.645 − ⎥ 8.4 ⎥⎦ ⎢⎣ 35 ⎥⎦ = P[z ≤ −1.88] = 0.0301 PWR(38) = 1 − 0.0301 = 0.9699 Conclusion : Becasue β is relatively small, we accept the null hypothesis that the training program has not increased the average sales per month above the point at which increased sales would offset the cost of the training program. Answer to Example 5.6 (1) H 0 : µ ≥ 16.37 H a : µ < 16.37 n= ( zα + z β ) 2 σ 2 ∆2 (1.645 + 2.33) 2 ⋅ 0.2252 = 79.99 ≈ 80 = (16.37 − 16.27) 2 Suppose that after obtaining the sample, we compute y = 16.35 ounces. The computed value of the test statistic is : z= y − 16.37 σy = 16.35 − 16.37 = −0.795 (< z0.05 = 1.645) 0.225 / 80 Conclusion : The manufacutrer is somewhat secure in concluding that the mean fill from the examined machine is at least 16.37 ounces. Answer to Example 5.7 (1) H 0 : µ ≤ 380 H a : µ > 380 α = 0.01 y−µ 10 390 − 380 = = 2.01 σ 35.2 4.979 50 n p - value = P ( y ≥ 390) = P( z ≥ 2.01) = 0.0222 > α = 0.01 Accept H 0 . T .S . : z = = Conclusion : The number of improperly issued parking tickets has not increased. (2) p - value = P( y ≥ 390) = P ( z ≥ 2.01) = 0.0222 < α = 0.05 Reject H 0 . Conclusion : The number of improperly issued parking tickets has increased. Answer to Example 5.8 (1) 0.2 0.3 0.4 0.5 0.6 0.7 0.8 To determine whether the data appear to have been randomly sampled from a normal distribution. Salmonella level • -1.5 -1.0 -0.5 0.0 0.5 Quantiles of Standard Normal 1.0 1.5 Answer to Example 5.8 (2) H 0 : µ ≤ 0.3 H a : µ > 0.3 α = 0.01 Rejection region : t0.01,df =9−1=8 = 2.896 y = 0.456, s = 0.2128 y − µ00 0.456 − 0.3 = 2.21 < t0.01,8 = 2.896 s/ n 0.2128 / 9 p − value = P(t > 2.21) = 0.029 t= = 95%C.I . = y ± tα s 0.2128 = 0.45 ± 1.86 ⋅ = 0.45 ± 0.132 n 9 Accept H 0 . Conclusion : The average level of Salmonella enteritidis in the ice cream is not greater than 0.3 MPN/g. Answer to Example 5.8 (3) • To calculate the probability of Type II error for the test. µ0 − µa ] β ( µ a ) = p[t < tα − σ/ n β ( µ a ) : the probability of a Type II error if the actual value of the mean is µ a µ 0 : the null value of µ µ a : the actual value of the mean in H a 0.8 0.7 0.4 0.5 0.6 df = 8 df = 17 0.1 0.2 0.3 df = 26 0.0 Probability of Type II error 0.9 1.0 Answer to Example 5.8 (4) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 Difference standardized by σ