252solnB4 2/13/08 (Open this document in 'Page Layout' view) B. HYPOTHESIS TESTS FOR ONE SAMPLE 1. The Meaning of Hypothesis Testing Text 9.1-9.12 [9.1 – 9.12] (9.1 – 9.12), 9.16** [9.17], (9.17) 2. Steps for Testing a Hypothesis Applied to testing for a Population Mean Text 9.20, 9.28a,c,d, 9.29 a,c,e [9.18, 9.26a,b,d,e, 9.27a,b,d,e], (9.18, 9.26a,b,d,e, 9.27a,b,d,e) Text 9.48-9.51, 9.59 [9.46 - 9.49, 9.52] (9.44 – 9.47, 9.50) 3. The Use of p-value instead of Significance Levels. Text 9.28b, 9.29b [9.26c, 9.27c], B7 (B6), Text 9.34-9.44 [9.32 – 9.39, 9.40*, 9.41*, 9.44] (9.26c, 9.27c, B6, 9.32 – 9.39, 9.40) [9.40* reads ‘Suppose that in a one-tail hypothesis test where you reject H 0 only in the lower tail, you compute the value of the test statistic z as 1.38, what is the p-value?’ 9.41 reads ‘In Problem 9.40, what would be your statistical decision if you tested the null hypothesis at the 0.01 level of significance?’] B8. Graded Assignment 2 will be posted. 4. Type One and Type Two Errors Text 9.82-9.86 [9.86 – 9.90] (9.81 – 9.85) 5. Hypotheses about a Proportion Text 9.66-9.69, 9.70**, 9.72**[9.62 – 9.64, 9.66*, 9.67*], (9.57 – 9.59) 6. The Sign Test B1*, B2, B3 (B1, B2) 7. Hypothesis Test for Means - Rare Events B4, B5 (B3, B4) 8. Hypothesis Tests for a Variance. Text 12.45[9.80] (9.75), B6 (B5) ------------------------------------------------------------------------------------------------------------------ Sections 7 – 8 are in this document. Hypothesis Test for Means - Rare Events - A code word for the Poisson distribution Problem B4: A bank's average default rate on loans is supposedly 6 per month. In the first month there are 12 defaults. Test the first assertion assuming a Poisson distribution. Use a two-sided test with a 5% significance level. H 0 : Poisson6 Solution: If we assume that the distribution is Poisson, our hypotheses are . Though it H 1 : not Poisson6 is possible to put together a rejection region, the easiest way to do this is to use the Poisson(6) table and a p-value approach. If we look up the probability that x is 12 or larger we find: pvalue 2Px 12 21 Px 11 21 .9799 2.0201 .0402 . Since pvalue , reject H 0 . 1 252solnB4 2/13/08 (Open this document in 'Page Layout' view) Problem B5: a) I claim that x is binomially distributed with p .01 . Test this assertion using a 2-sided 5% test if there are 3 successes in 10 trials. b) Test for a binomial distribution with p .10 when n 10 and x 4 . c) If n 100 and x 9 , test to see if p is at least 0.4. d) Calls coming into a switchboard in an hour presumably have a Poisson distribution with a mean of 144. Test this hypothesis if, in a given hour, 200 calls come in. Solution: a) If we assume that x has the Binomial distribution, our Hypotheses are H 0 : Binomial p .01 . If we have a Binomial table for p .01, note that np 10.01 .01, so H 1 : not Binomial p .01 that our value of x is too large. pvalue 2Px 3 21 Px 2 21 .99989 .00022 . This is below the significance level, so reject H 0 . b) If p .10 and n 10 , np 1 so that x 4 is too large. pvalue 2Px 4 21 Px 3 21 .9872 2.0128 .0256 . This is below the significance level, so reject H 0 . H 0 : Binomial p .4 c) Our hypotheses are now . Since n 100 , np 40 and x 9 is too small. H 1 : Binomial p .4 From the binomial table for p .4 , pvalue Px 9 .00000 , so reject H 0 . If a table with n 100 is unavailable, use the Normal approximation, (with a continuity correction) pvalue Px 9 P p .09 .5 .09 .4 100 P z .09 .005 .4 Pz 6.23 0, so reject H . Pz 0 .4.6 .0024 100 d) This is a Poisson problem, but a table for Poisson(144) is not available. Fortunately for large values of m , the Poisson mean, the Poisson distribution is approximated by the Normal distribution x ~ N m, m . Since there is no specific significance level stated, assume that a 2-sided 95% test is wanted. x m 200 144 H 0 : Poisson144 Then z 4.67 . Since z 2 z.025 1.96 , and our test H 1 : not Poisson144 144 m ratio is not between 1.96 , reject H 0 . Hypothesis Tests for a Variance. From the Formula Table: Interval for Confidence Interval VarianceSmall Sample 2 VarianceLarge Sample Hypotheses Test Ratio n 1s 2 H 0 : 2 02 .25 .5 2 H1: : 2 02 2 s 2DF H 0 : 2 02 z 2 2DF H1 : 2 02 n 1s 2 02 Critical Value 2 s cv .25 .5 2 02 n 1 z 2 2 2DF 1 2 252solnB4 2/13/08 (Open this document in 'Page Layout' view) Exercise 12.45 [9.80 in 9th edition] (9.75 in 8th edition): .05 . A candy manufacturer must monitor the temperature at which candy is baked because too much inconsistency will hurt the taste of the candy. In the past the standard deviation has been 1.2 degrees Fahrenheit. A sample of 30 batches is selected and the sample standard deviation is 2.1 degrees. Unfortunately the author’s original data has disappeared. a) Test to see if the population standard deviation has increased over 1.2 degrees. b) What assumptions are needed for this test? c) Compute a p-value for a) and explain its meaning. Solution: So your only facts are n 30 and s 2.1. (a) H0: 1.2 F. The standard deviation of the oven temperature has not increased above the process standard deviation of 1.2 degrees F. H1: 1.2 F. The standard deviation of the oven temperature has increased above the process standard deviation of 1.2 degrees F. (i) Test Ratio Method: (This is the method that everyone uses.) From the Instructor’s Solution Manual (edited). Note that this is a one-sided upper tail test so that we use the upper 5% value of chi-squared. Decision rule: df = 29. If .20529 42.557 , reject H0. Test statistic: 2 (n – 1) s 2 02 29 2.12 1.2 2 = 88.813 2 Decision: Since the test statistic of calc = 88.813 is above the critical boundary of = 42.557, reject H0. There is sufficient evidence to conclude that the standard deviation of the oven temperature has increased above 1.2 degrees F. (ii) Critical value Method (You are not responsible for this method): We interpret 2 2 s cv .25 .5 2 02 n 1 value for 2 and to mean that for a 2-sided test we use 22 02 n 1 as an upper critical 12 2 02 as a lower critical value with which we compare the n 1 variance. Since this is a one-sided upper tail test we only need the upper critical value, 2 02 n 1 42 .557 1.22 2.113 . We reject H 0 if the sample variance is above this value. 29 Since s 2 2.12 4.41, we reject the null hypothesis. (iii) Confidence interval method: From the outline, the formula for a 2-sided interval is n 1s 2 2 2 2 n 1s 2 12 2 , but we only need a 1-sided interval based on the alternate hypothesis, H1: 1.2 F. the left side of the interval above with the subscript changed is n 1s 2 2 2 , which can be reversed to give us 2 n 1s 2 2 29 2.12 3.005 . 42 .557 But the null hypothesis says that 2 1.22 1.44 . Since it is impossible for the variance to be both above 3.005 and below 1.44, we reject the null hypothesis. (b) We must assume that the data in the population are Normally distributed to be able to use the chi-square test of a population variance or standard deviation. 3 252solnB4 2/13/08 (Open this document in 'Page Layout' view) (c) p value = 5.53 x 10–8 or 0.00000005. The p value is the probability that a sample is obtained whose standard deviation is larger than 2.1 degrees F. when the null hypothesis is true is 5.53 x 10–8, a very small probability. Note: The p value was found (by the author of the Instructor’s Solution Manual) using Excel. If you use the 29 df column of the chi-squared table, remember that the test ratio is 2 (n – 1) s 2 29 2.12 = 88.813, which is larger than 52.3360, the 0.005 value. 1.2 2 From this you can guess that the p-value is below .005. Problem B6: If 02 x x x 2 2 nx 2 40 and the confidence level is 95%, test if it is true that the variance is 2 when a) n 10 , b) n 20 , c) n 40. H 0 : 2 2 Solution: We are testing . From the outline, since s 2 2 H 1 : 2 n 1 x x x x n 1 2 , x x 2 40 x x 2 and 20 2 in all cases. Since 2 2 2 2 2 n 1 0 0 0 0 the confidence level is 95%, all we really need to do is find out whether our value of 2 falls between 2 n 1 s 2 2 12 2 and 22 , in this case .2975 and .2025 . 9 2.700 and 29 19.023 . Since our value of 2 does a) n 10 implies 9 degrees of freedom. .2975 .025 not fall between them, reject H 0 . In a) and b) make a diagram showing a chi-squared distribution with .2975 and .2025 . The diagram should show that there is a probability of 2.5% below .2975 , a probability of 2.5% above .2025 and 95% between them The 'reject' regions are below .2975 and above .2025 . In a) you will show that 2 20 falls in the 'reject' zone. In b) you will show that it does not. 19 8.907 and 219 32 .852 . Since our value of 2 falls b) n 20 implies 19 degrees of freedom. .2975 .025 between them, do not reject H 0 . c) n 40 implies 39 degrees of freedom. Because we are beyond the 2 table, we must use the approximation, z 2 2 2 DF 1. We already know that 2 20, so that z 220 239 1 6.32 8.77 2.95 . For a confidence level of 95%, z must be between 1.96 and 1.96. Since this value of z is not, reject H 0 . Make a diagram showing the Normal distribution with z.025 and z.025 and a mean of zero. The diagram should show that there is a probability of 2.5% below z.025 , a probability of 2.5% above z.025 and 95% between them. The 'reject' regions are below z.025 and above z.025 . You will show that z 2.95. falls in the 'reject' zone. 4