252solnB3 2/13/08 (Open this document in 'Page Layout' view!) 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 4 – 6 are in this document. Note that there are some very useful sign test problem that were not assigned included in this document. Type One and Type Two Errors The outline says 'a Type one error is rejecting H 0 when H 0 is true (wrongly rejecting H 0 ) ; a Type two error is accepting H 0 when H 1 is true (wrongly not rejecting H 0 ). PType I error PType II error H 0 True H1 True Do not reject H 0 1 Confidence Level Reject H 0 Operating Characteristic 1 Significance Level Power The following problems are simply a review of the concepts covered up to now in this section. Answers to these problems come from the Instructor’s Solution Manual . 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) Exercise 9.82 [9.86 in 9th] (9.81 in 8th edition): The problem asks for difference between null and alternative hypotheses. The null hypothesis represents the status quo or the hypothesis that is to be disproved. The null hypothesis includes an equal sign in its definition of a parameter of interest. The alternative hypothesis is the opposite of the null hypothesis, and usually represents taking an action. The alternative hypothesis includes either a less than sign, a not equal sign, or a greater than sign in its definition of a parameter of interest. Exercise 9.83 [9.87 in 9th] (9.82 in 8th edition): The problem asks for difference between Type I and Type II errors. A Type I error represents rejecting a true null hypothesis, while a Type II error represents not rejecting a false null hypothesis. Exercise 9.84 [9.88 in 9th] (9.83 in 8th edition): The problem asks what the power of a test means. The power of a test is the probability that the null hypothesis will be rejected when the null hypothesis is false. Exercise 9.85 [9.89 in 9th] (9.84 in 8th edition): The problem asks the difference between one-tail and twotail tests. In a one-tailed test for a mean or proportion, the entire rejection region is contained in one tail of the distribution. In a two-tailed test, the rejection region is split into two equal parts, one in the lower tail, and the other in the upper tail of the distribution. Exercise 9.86 [9.90 in 9th] (9.85 in 8th edition): The problem asks for the meaning of a p-value. The p-value (or observed significance level) is the probability of obtaining a test statistic equal to or more extreme than the result obtained from the sample data, given that the null hypothesis is true. Tests for a population proportion - Remember! A proportion p must be between zero and one and q 1 p must also be between zero and one. Exercise 9.66 [9.62 in 9th] (9.57 in 8th edition): Given: x 88 and n 400 , find the sample proportion. Solution: The text uses p s for a sample proportion. I use p . Note that p 1 q and p 1 q . p ps x 88 .22 n 400 Exercise 9.67 [9.63 in 9th] (9.58 in 8th edition): In 9.66 if the null hypothesis is H 0 : p .20 , what is the value of the z test ratio? Solution: From the outline, z p p0 p where p p0 q0 .20 .80 .0004 0.02 . So p n n .22 .20 1.00 . .02 The Instructor’s Solution Manual also gives the following formula: x np 88 400 .20 z 1.00 . npq 400 .20 .80 and z 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) Exercise 9.68 [9.64in 9th] (9.59 in 8th edition): Given H 0 : p .20 and H 1 : p .20 , .05 and z as computed above, what is your statistical decision? Solution: Since this is a 2-sided test, we will reject the null hypothesis if z z z.025 1.960 or 2 z z 2 z.025 1.960. Decision rule: If z < – 1.96 or z > 1.96, reject H0. Make a diagram. Draw a normal cuve centered at zero and shade the areas below -1.960 and above +1.960. p p0 .22 .20 Test statistic: z 1.00 p .02 Decision: Since z calc 1.00 is between the critical bounds of z 1.960 , do not reject H0. According to the outline there are three ways to do a one-sample test of a proportion if the hypotheses are H 0 : p p 0 and H1 : p p0 : (i) Test Ratio: z p p0 p , p p0 q0 , (ii) Critical n Value: pcv p0 z p and (iii) Confidence Interval: p p z s p where s p 2 2 pq . In most n problems, you should use only one method. The following exercises appear only in one edition. Exercise [9.66 in 9th] (Not in 8th edition): a) If we have the following: H 0 : p .50 and H 1 : p .50 , .05 , x 357 , n 811 and 357 .440 , what is your statistical decision? b) Find a p-value. c) Test H0: p 0.50, H1: p > 0.50 if 811 now p .57 . d) Find a p-value for the result in c). e) Assume H0: p 0.55, H1: p > 0.55 and the sample proportion is .57. So now p .57 and p 0 .55. What is your statistical decision? f) Find a p-value in e). p Solution: a) (i) Test Ratio – This is a 2-sided test, so use z z.025 1.960 and 2 z 2 z.025 1.960. . Make a diagram with the mean at zero showing the rejection zones are below -1.960 and above 1.960. Decision rule: If z < – 1.96 or z > 1.96, reject H0. p0 q0 .50.50 .00030826 .01756 . n 811 p p 0 .44 .50 3.417 . Now compute z p .01756 Note that p If you use your diagram, you will see that this value of z falls in the lower rejection zone. Decision: Since z calc 3.4061 is less than the lower critical bounds of z z.025 2 1.960 , reject H0 and conclude that there is enough evidence to show that the percentage of all PC owners in the U.S. who rank sharing their credit card information as the number one concern in on-line shopping is not 50%. (ii) The critical value formula is pcv p0 z p , so 2 p cv .50 1.960 .01756 .50 .0344 or .466 to .534. Make a diagram with the mean at .50 showing the rejection zones are the areas below .466 and the area above .534. Since p .44 is below .466, reject H 0 . 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) (iii) The confidence interval formula is p p z s p where 2 pq .44 .56 .00030382 .01743 . So p .44 1.960 .01743 n 811 .44 .0342 or .406 to .474. Make a diagram with the mean at .44 showing the confidence interval by shading the area between .406 and .474. Show the null hypothesis by marking p 0 .50 on the same diagram. Since this point is outside the confidence sp interval, reject H 0 . The usual way to find a p-value in a 2-sided problem is to take the probability above (or below in a left sided problem) the value of z and double it. p value 2Pz 3.417 .5 .4997 .0006 The probability of obtaining a sample proportion further away from the hypothesized value of 0.50 is 0.0003 if the null hypothesis is true. Answers in (a) and (b) differ slightly from those in the Instructor’s Solution Manual. Where did I go wrong? b) c) Test H0: p 0.50, H1: p > 0.50 if now p .57 . Find a p-value. (i) Test Ratio – This is a 1-sided upper tail test, so use z z .05 1.645 . . Make a diagram with the mean at zero showing the rejection zone is above 1.645. Decision rule: If z > 1.645, reject H0. p p 0 .57 .50 3.987 . Recall that p .01756 and compute z p .01756 If you use your diagram, you will see that this value of z falls in the rejection zone. Decision: Since z calc 3.987 is greater than the critical bound of z z.05 1.645 , reject H0 and conclude that there is enough evidence to show that the percentage of all PC owners in the U.S. who would pay an extra $75 for a new PC delivering a more secure on-line experience is more than 50%. (ii) The critical value formula is pcv p0 z p , But this is a one-sided upper tail 2 test, so use a critical value above p 0 . pcv p0 z p .50 1.645.01756 .525 Make a diagram with the mean at .50 showing the rejection zone as the area above .525. Since p .57 is above .525, reject H 0 . (iii) The confidence interval formula is p p z s p where 2 pq .57 .43 .00030221 .01738 . But this is a one-sided upper tail n 811 test, the alternate hypothesis is H1: p > 0.50, and we model the one-sided confidence interval on the alternate hypothesis, so use p p z s p .57 1.645.01738 .541 . sp Make a diagram with the mean at .57 showing the confidence interval by shading the area above .541. Show the null hypothesis H 0 : p .50 on the same diagram by shading an area below .50. These two areas will not overlap, indicating that the confidence interval contradicts the null hypothesis. p value Pz 3.987 .5 .5000 0 . The probability of obtaining a sample which will yield higher than 57% of all PC owners in the U.S. who would pay an extra $75 for a new PC delivering a more secure on-line experience is essentially zero if the null hypothesis is true. Answers in (c) and (d) differ slightly from those in the Instructor’s Solution Manual. Is it really me? (d) 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) 9.66 (e) Assume H0: p 0.55, H1: p > 0.55 and the sample proportion is .57 So now p .57 and p 0 .55. What is your statistical decision? Find a p-value. (i) Test Ratio – This is a 1-sided upper tail test, so use z z .05 1.645 . . Make a diagram with the mean at zero showing the rejection zone is above 1.645. Decision rule: If z > 1.645, reject H0. p0 q0 .55.45 .00030518 .01746 and compute n 811 p p 0 .57 .55 z 1.145 . p .01746 Compute p If you use your diagram, you will see that this value of z does not fall in the rejection zone. Decision: Since z calc 1.145 falls below the critical bound of 1.645, do not reject H0 and conclude that there is not enough evidence to show that the percentage of all PC owners in the U.S. who would pay an extra $75 for a new PC delivering a more secure on-line experience is more than 55%. (ii) The critical value formula is pcv p0 z p , But this is a one-sided upper tail 2 test, so use a critical value above p 0 . pcv p0 z p .55 1.645.01756 .579 Make a diagram with the mean at .55 showing the rejection zone as the area above .579. Since p .57 is not above .525, do not reject H 0 . (iii) The confidence interval formula is p p z s p where 2 pq .57 .43 .00030221 .01738 . But this is a one-sided upper tail n 811 test, the alternate hypothesis is H1: p > 0.50, and we model the one-sided confidence interval on the alternate hypothesis, so use p p z s p .57 1.645.01738 .541 . sp Make a diagram with the mean at .57 showing the confidence interval by shading the area above .541. Show the null hypothesis H 0 : p .55 on the same diagram by shading an area below .55. These two areas will overlap, indicating that the confidence interval does not contradict the null hypothesis. p value Pz 1.145 .5 .3739 .1261 . The probability of obtaining a sample which will yield a higher percentage than 57% of all PC owners in the U.S. who would pay an extra $75 for a new PC delivering a more secure on-line experience is 0.1261 if the null hypothesis is true. Answers in (e) and (f) differ slightly from those in the Instructor’s Solution Manual and I’m getting annoyed. (f) For (e) the Instructor’s Solution Manual has “Test statistic: Z ps p 0.57 0.55 = 1.1258.” I p(1 p ) 0.55(0.45) n 811 don’t like to work this hard, But let’s try .57 .55 .55.45 811 .57 .55 2 .55.45 811 .02 2 811 .55.45 1.3107 1.145 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) Exercise[9.67 in 9th] (Not in 8th or 10th edition): The statement to be evaluated is that less than half of all companies are delaying data-storage expenditures because of an economic slowdown. In a) for example, the resulting hypotheses are tested after a survey of 50 firms shows that 19 have delayed. In c) the survey is repeated with 100 firms and similar results. a) Given the following, what is your statistical decision? H0: p 0.5, H1: p < 0.5 , p 0 .50, p .38 , n 50 and .01 . b) Find a p-value for a). c) Given the following, what is your statistical decision? H0: p 0.5, H1: p < 0.5, p 0 .50, p .38 , n 100 and .01 . d) Find a p-value for c). e) What is the effect of the larger sample size? f) What are the consequences of failing to state a sample size when results are stated? 9.67 (a) Given the following, what is your statistical decision? H0: p 0.5, H1: p < 0.5 , p 0 .50, p .38 , n 50 and .01 . Find a p-value. (i) Test Ratio – This is a 1-sided lower tail test, so use z z .01 2.327 . Make a diagram with the mean at zero showing the rejection zone is below -2.327. Decision rule: If z < -2.327, reject H0. p0 q0 .50.50 .005 .07071 and compute n 50 p p 0 .38 .50 z 1.697 . p .07071 Compute p If you use your diagram, you will see that this value of z does not fall in the rejection zone. Decision: Since z calc 1.697 is not below the critical bound of z z.01 2.327 , do not reject H0. There is not enough evidence to show less than half of all companies are delaying data-storage expenditures. (ii) The critical value formula is pcv p0 z p , But this is a one-sided lower tail 2 test, so use a critical value below p 0 . pcv p0 z p .50 2.327.07071 .335 Make a diagram with the mean at .50 showing the rejection zone as the area below .335. Since p .38 is above .335, do not reject H 0 . (iii) The confidence interval formula is p p z s p where 2 pq .38 .62 .0004712 .06864 . But this is a one-sided lower tail n 50 test, the alternate hypothesis is H1: p < 0.5, and we model the one-sided confidence interval on the alternate hypothesis, so use p p z s p .38 2.327.06864 .539 . sp Make a diagram with the mean at .38 showing the confidence interval by shading the area below .539. Show the null hypothesis H 0 : p .50 on the same diagram by shading an area above .50. These two areas will overlap, indicating that the confidence interval does not contradict the null hypothesis. (b) (c) p value Pz 1.697 .5 .4554 .0446 . The probability of observing 38% or less of the companies surveyed having delayed expenditures on storage deployments because of economic slowdown is 0.0446 if the null hypothesis is true. Given the following, what is your statistical decision? H0: p 0.5, H1: p < 0.5, p 0 .50, p .38 , n 100 and .01 . Find a p-value. i) Test Ratio – This is a 1-sided lower tail test, so use z z .01 2.327 . Make a diagram with the mean at zero showing the rejection zone is below -2.327. Decision rule: If z < -2.327, reject H0. 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) p0 q0 .50.50 .0025 .05 and compute n 100 p p 0 .38 .50 z 2.400 . If you use your diagram, you will see that this value of p .05 Compute p z falls in the rejection zone. Decision: Since z calc 2.400 is below the critical bound of z z.01 2.327 , reject H0. There is enough evidence to show less than half of all companies are delaying data-storage expenditures. (ii) The critical value formula is pcv p0 z p .50 2.327.05 .384 Make a diagram with the mean at .50 showing the rejection zone as the area below .384. Since p .38 is below .384, reject H 0 . pq .38 .62 .002356 .04854 , n 100 so p p z s p .38 2.327.04858 .493 . Make a diagram with the mean at .38 (iii) The confidence interval formula uses s p showing the confidence interval by shading the area below .493. Show the null hypothesis H 0 : p .50 on the same diagram by shading an area above .50. These two areas will not overlap, indicating that the confidence interval contradicts the null hypothesis. (d) (e) (f) p value Pz 2.400 .5 .4918 .0082 . (The remainder of this problem is quoted from the Instructor’s Solution Manual.) The probability of observing 38% or less of the companies surveyed having delayed expenditures on storage deployments because of economic slowdown is 0.0082 if the null hypothesis is true. What is the effect of the larger sample size? The larger sample size of 100 responses reduces the standard error (variation) of the sample proportion and reduces the probability of observing 38% or less of the companies surveyed having delayed expenditures on storage deployments because of economic slowdown if the null hypothesis is true. What are the consequences of failing to state a sample size when results are stated? When one fails to report the sample size used in a survey, the readers cannot accurately evaluate the sampling error and, hence, there is a potential that the study can promote a viewpoint that might otherwise be truly insignificant. The following exercises appear only in the 10th edition. Exercise 9.69: Solution: In a survey, 593 out of 1040 respondents indicated that they would rather have $100 than a day off. a) Test the statement that more than half of workers would prefer the money to a day off. Use a 95% confidence level. b) Find a p-value. 593 .5702 . (a) H 0 : p .50 and H 1 : p .50 , .05 , x 593 , n 1040 and p 1040 (i) Test Ratio – This is a 1-sided test, so use z z.05 1.645 . Make a diagram with the mean at zero showing the rejection zone above 1.645. Decision rule: If z > 1.645, reject H0. p0 q0 .50.50 .0002404 .015504 . n 1040 p p 0 .5702 .50 4.528 . Now compute z p .015504 Note that p If you use your diagram, you will see that this value of z falls in the rejection zone. 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) Decision: Since z calc 4.528 is more than the critical bound of z 1.645 , reject H0 and conclude that there is enough evidence to show that more than half of workers would prefer $100 to a day off. (ii) The critical value formula is pcv p0 z p , so for a right sided test we use 2 p cv .50 1.645 .015504 .5255 . Make a diagram with the mean at .50 showing the rejection zone is are the area above .5255. Since p .5702 is above .5255, reject H 0 . (iii) The confidence interval formula is p p z s p where 2 pq .5702 .4298 sp .0002356 .015351 .But, since the alternate hypothesis is n 1040 H 1 : p .50 we must use the one-sided interval with the same direction as the alternate hypothesis, which is p p z s p .5702 1.645 .015351 . This becomes p .5449 . Make a diagram with the middle at .5702 showing the confidence interval by shading the area above .5449. Show the null hypothesis by marking p 0 .50 or shading the area below .50 (differently) on the same diagram. Since .50 (and the area below it) is outside the confidence interval, reject H0 . (b) This is a right sided test, since we will reject the null hypothesis if the sample proportion is significantly larger than .50. No matter what the observed proportion is, the p-value will be the probability that the observed proportion is as large or larger than the actually observed proportion. Since p is essentially Normally distributed, we can say pvalue P p .5702 Pz 4.528 Pz 0 P0 z 4.53 .5 .5 0. Exercise 9.70: We are testing to see if the proportion of employers who plan to recruit new employees is above last year’s level of 43%. Out of a sample of 362 potential employers, 181 plan to hire. .05 . a) State and test the null and alternative hypotheses. b) find a p-value. 181 .5000 . Use (a) H 0 : p .43 and H 1 : p .43 , .05 , x 181, n 362 and p 362 only one of the following methods in a test situation. (i) Test Ratio – This is a 1-sided test, so use z z.05 1.645 . Make a diagram with the mean at zero showing the rejection zone above 1.645. Decision rule: If z > 1.645, reject H0. p0 q0 .43.57 .0006771 .026021 . n 362 p p0 .5000 .43 2.690 . Now compute z p .026021 Note that p If you use your diagram, you will see that this value of z falls in the rejection zone. Decision: Since z calc 2.690 is more than the critical bound of z 1.645 , reject H0 and conclude that there is enough evidence to show that more than 43% plan to hire. If we want the p-value instead, the p-value will be P p .50 Pz 2.69 Pz 0 P0 z 2.69 .5 .4964 .0036 . Since this is below 5%, we reject the null hypothesis. (ii) The critical value formula is pcv p0 z p , so for a right sided test we use 2 p cv .43 1.645 .026021 .4728 . Make a diagram with the mean at .50 showing the rejection zone is are the area above .4728. Since p .5000 is above .4728, reject H 0 . (iii) The confidence interval formula is p p z s p where 2 sp pq .5000 .5000 .0006906 .026280 .But, since the alternate hypothesis n 362 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) is H 1 : p .43 we must use the one-sided interval with the same direction as the alternate hypothesis, which is p p z s p .500 1.645 .026280 . This becomes p .4568 . Make a diagram with the mean at .5000 showing the confidence interval by shading the area above .4568. Show the null hypothesis by marking p 0 .43 or shading the area below .43 (differently) on the same diagram. Since .43 (and the area below it) is outside the confidence interval, reject H 0 . (b) This is a right sided test, since we will reject the null hypothesis if the sample proportion is significantly larger than .50. No matter what the observed proportion is, the p-value will be the probability that the observed proportion is as large as or larger than the actually observed proportion. Since p is essentially Normally distributed, we can say pvalue P p .5702 Pz 4.528 Pz 0 P0 z 4.53 .5 .5 0. Exercise 9.72: We have been asked to test whether the per cent of people who trust energy-efficiency ratings on cars differs from 50%. The results we will use come from a sample in which 552 responded ‘yes’ and 531 responded ‘no.’ a) This is to be tested at the 5% significance level by the six-step method of hypothesis testing and by b) the five-step p-value approach. a) The 6-step approach. Step 1: State the null and alternative hypotheses. H 0 : p 50 and H 1 : p .50 Step 2: Choose and n . .05 , n 552 531 1083 Step 3: Select the test statistic and determine its sampling distribution. Use either p p0 z or p . Both of these have the Normal distribution. p Step 4: Find rejection and nonrejection zones (critical values). Depending on your choice in Step 3 use either z or pcv p0 z p to find your rejection zones. 2 Step 5: Collect data and compute a test statistic or ratio. Compute z p p0 p Step 6: Make your statistical decision and state a managerial conclusion. or p . 552 .5097 . 1083 1.960 . Make a diagram with (a) H 0 : p 50 and H 1 : p .50 , .05 , x 552 , n 552 531 1083 and p (i) Test Ratio – This is a 2-sided test, so use z z.025 2 the mean at zero showing the lower rejection zone below -1.960 and the upper rejection zone above 1.960. Decision rule: If z 1.960 or z > 1.960, reject H0. p0 q0 .50.50 .0002308 .015193 . n 1083 p p 0 .5097 .50 0.6385 . Now compute z p .015193 Note that p If you use your diagram, you will see that this value of z falls between -1.960 and 1.960. It is not in the rejection zone. Decision: Since z calc 0.6385 is not in the rejection zone, do not reject H0 and conclude that there is not enough evidence to show the proportion of people who do not trust the ratings differs from 50%. (ii) The critical value formula is pcv p0 z p , so for a two-sided test we use 2 p cv .50 1.960 .0155193 .50 .0304 or .4696 to .5304. Make a diagram with the mean at .50 showing the rejection zones as the area below .4696 and the area above .5304. Since p .5097 is between these two critical values, do not reject H 0 . 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) (iii) The confidence interval formula is p p z s p where 2 pq .5097 .4903 .0002308 .015191 . The confidence interval is n 1083 p p z s p p .5097 1.960 .015191 .5097 .0298 or .4799 to .5395. Make a sp diagram with the mean at .5097 showing the confidence interval by shading the area between .4799 and .5395. Show the null hypothesis by marking p 0 .50 . Since .50 is inside the confidence interval, do not reject H 0 . b) The five-step approach Step 1: State the null and alternative hypotheses. H 0 : p 50 and H 1 : p .50 Step 2: Choose and n . .05 , n 552 531 1083 Step 3: Select the test ratio and determine its sampling distribution. Use p p0 z . This has the Normal distribution. p Step 4: Collect data and compute a ratio and find a p-value for the ratio. Compute z0 p p0 p . For a 2-sided test find pvalue 2Pz z 0 if the ratio is negative or pvalue 2Pz z 0 if the ratio is positive. Step 5: Make your statistical decision and state a managerial conclusion. If the p-value is below your significance level, reject the null hypothesis (b) Decision rule: If pval .05 , reject H0. p p 0 .5097 .50 0.6385 . Remember that z p .015193 This is a two sided test since we will reject the null hypothesis if the sample proportion is significantly above or below .50. Since the observed proportion is above .50, we take the probability that the observed proportion is above .5097 and double it. Since p is essentially Normally distributed, we can say pvalue 2P p .5097 2Pz 0.6385 2Pz 0 P0 z 0.64 2.5 ..2389 2.2611 5222 . Decision: Since the p-value is not below .05, the significance level, do not reject H0. 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) The Sign Test Useful background material from a previous text, James T. McClave, P. George Benson and Terry Sincich, Statistics for Business and Economics, 8th ed. , Prentice Hall, 2001. MBS Exercise 15.1: Why would we test for a median instead of a mean? Solution: If the population is not normal it is generally believed that the median is a better measure of central tendency than the mean, so the Sign Test, which is usually a test for the median, is often preferred. In practice this is used if the data is ordinal, or if the data has a skewed distribution or an extremely flat or peaked distribution. MBS Exercise 15.2: a) What is the probability that a given observation exceeds the mean in a Normal distribution? b) What is the probability that a given observation exceeds the median in a Normal distribution? c) What is the answer to these questions if the distribution is not Normal? Solution: a) The probability that x exceeds the mean in a Normal distribution is .5 because the mean and median are identical. b) The probability that x exceeds the median in a Normal distribution is .5 because the median is defined as the half-way point in the distribution. c) Because we have no way of knowing where the mean is relative to the median in a nonnormal distribution, we have no way of knowing the probability that x exceeds the mean. d) If the distribution is continuous, the probability that that x exceeds the median is .5 again. If the distribution is not continuous, it is still often a safe bet to assume that the probability is .5, but there is the possibility that the presence of a fair number of observations that are exactly on the median will change this conclusion. In practice, the researcher will often eliminate observations that are exactly on the alleged median before testing that half of the other observations are above the median. MBS Exercise 15.4: For the following sample, {8.4, 16.9, 15.8, 12.5, 10.3, 4.9, 12.9, 9.8, 23.7, 7.3} test the following hypotheses using the sign test and the binomial tables. a) H 0 : 9 , b) H 0 : 9 , c) H 0 : 20 , d) H 0 : 20 . Solution: It might help to put the numbers in order. 4.9, 7.3, 8.4, 9.8, 10.3, 12.5, 12.9, 15.8, 16.9, 23.7 The easiest way to do this is to try a p-value approach. We use the Binomial distribution with p .5 for all problems. .05 . a) H 0 : 9 , H1 : 9 If the median is 9, half the observations should be above 9. If the median is below 9, less than half the observations should be above 9. Thus, if p represents the proportion of numbers above 9, the hypotheses become H 0 : p .5 , H1 : p .5 , so if the null hypothesis is true we would expect 5 or fewer numbers out of 10 to be above 9. However, there are 7 numbers above 9. Thus pval Px 7 1 Px 6 1 .82812 .17188 . Since the p-value is not below the significance level, we cannot reject the null hypothesis. Note that if p represents the proportion of observations that are below 9, our hypotheses become H 0 : p .5 , H1 : p .5 . Since there are three numbers below 9, pval Px 3 .17188 b) H 0 : 9 , H1 : 9 H1 : 9 If the median is 9, half the observations should be above 9. Thus, if p represents the proportion of numbers above 9, the hypotheses become H 0 : p .5 , H1 : p .5 , so if the null hypothesis is true we would expect 5 numbers out of 10 to be above 9. However, there are 7 numbers above 9. Remember that because this is a 2-sided hypothesis we double the p-value. Thus pval 2Px 7 2.17188 .34366 . Since the p-value is not below the significance level, we cannot reject the null hypothesis. Note that if p represents the proportion of observations that are below 9, our hypotheses become H 0 : p .5 , H1 : p .5 , anyway. Since there are three numbers below 9 when we expect 5, pval 2Px 3 2.17188 .34366 . c) H 0 : 20 , H1 : 20 If the median is 20, half the observations should be below 20. If the median is above 20, less than half the observations should be below 20. Thus, if p represents the proportion of 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) numbers below 20, the hypotheses become H 0 : p .5 , H1 : p .5 , so if the null hypothesis is true we would expect 5 or fewer numbers out of 10 to be below 20. However, there are 9 numbers below 20. Thus pval Px 9 1 Px 8 1 .98926 .01074 . Since pval , reject H 0 . d) H 0 : 20 , H1 : 20 If the median is 20, half the observations should be below 20. Thus, if p represents the proportion of numbers below 20, the hypotheses become H 0 : p .5 , H1 : p .5 , so if the null hypothesis is true we would expect 5 numbers out of 10 to be below 20. However, there are 9 numbers below 20, which is too many. Thus pval 2Px 9 2.01074 .02148 . Since pval , reject H 0 . Now back to the assigned problems. Problem B1: (Leabo) A sample of married couples are asked their opinion of a new township noise ordinance. 40 couples are asked to rate the ordinance on a 1-10 scale. Of the couples, 4 husbands and wives liked the proposal equally well, 11 husbands liked it better than their wives, 25 wives liked it better than their husbands. Our null hypothesis is that husbands who like the proposal more than their wives are as likely as wives who like the proposal more than their husbands. 2x 1 n Solution: In this case drop the ties, so that we have only 36 measurements. z , where the + n n n applies if x , and the applies if x . If p is the fraction of husbands who like it better, than our 2 2 211 1 36 2.17 . If we use a 5% significance level, our ‘accept’ null hypothesis is H 0 : p .5 z 36 region will be between -1.96 and 1.96, so we reject our null hypothesis. Problem B2: A firm claims that its median wage is $32000. The union claims that the median is lower. A random sample of 100 employees shows that 40% are above $32000. Set this up as two hypotheses and test with a significance level of 5%. Solution: We always replace a hypothesis about a median with a hypothesis about a proportion in the sign test. The null hypothesis implicit in the above is that the median is at least $32000. This is because the union's claim is a perfect alternative hypothesis. Since we have the number over $32000 let p be the H 0 : 32000 H 0 : p .5 proportion over $32000. Then becomes . H 1 : 32000 H 1 : p .5 p0 q0 x .5.5 .05 . Note that a .40 , so that p n n 100 continuity correction has been added to all of these solutions. It has the effect of making the “accept” 0 .5 region larger by x 0.5 or p . n (i) Critical Value Method: .5 .5 p cv p 0 z p .5 1.645 .05 .5 .08225 .005 .41275 . If p is below this n 100 critical value we reject H 0 . Since .40 is below .41275, reject H 0 . Make a diagram with the mean at .5 and a 'reject' region below .4275. It should show that if the null hypothesis is true 95% of the points will be above .41275. Note that .05, n 100, x 40 and p 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) (ii) Test Ratio Method: There are three possible versions (all of which appear in the outline). if x n 2 In all those below, the rule frequently used is , where appears, use . n if x 2 p .5 p 0 .40 0.5 .5 n 100 Pz 1.90 z P p .40 P z p .05 .5 .4713 .0287 Make a diagram with the mean at 0 and a shaded area below -1.90 representing the p-value. z x .5 np0 np0 q 0 40 0.5 100 .5 Px 40 P z Pz 1.90 .0287 100 .5.5 240 1 100 Px 40 P z Pz 1.90 .0287 n 100 In each case, the p-value is .0287. Since .05, p value and we reject H 0 z 2x 1 n Problem B3 (old B2): We are testing that the median is 14. Let x be the number of items above 14. From a sample of size n 30 , we find x 25 . Use p for the proportion of the population over 14 and p for the proportion of the sample over 14. a) Test = 14 b) Test > 14 c) Test < 14 25 .8333 . Assume .05 . Solution: Note that p 30 H 0 : 14 H 0 : p .5 a) becomes . If we use the critical value method H 1 : 14 H 1 : p .5 p0 q0 0.5 .5.5 .5 pcv p0 z 2 .5 1.96 .5 .179 .017 .5 0.196 n n 30 30 or .304 to .696. Since .8333 is not in this interval reject H 0 . Make a diagram with the mean at .5 and 'reject' regions below .304 and above .696. It should show that if the null hypothesis is true 95% of the points will be between .304 and .696 and that .8333 is in the 'reject region. x .5 np0 We are probably better off using the test ratio method, with z . Here np0 q 0 np0 30 .5 15 and np0 q 0 15.5 7.5 . So 24 .5 15 pvalue 2 Px 25 2 P z 2 Pz 3.47 2.5 .4797 2.0003 .0006 . 7.5 Since this is below the significance level, reject H 0 . b) H 0 : 14 H 0 : p .5 becomes . H 1 : 14 H 1 : p .5 In this case 24 .5 15 pvalue Px 25 P z .0003 . Since this is below the significance level, 7.5 reject H 0 . 252solnB3 2/13/08 (Open this document in 'Page Layout' view!) c) H 0 : 14 H : p .5 becomes 0 . In this case, it is possible to have many items H 1 : 14 H 1 : p .5 over 14 and for H 0 still to be true. 25 .5 15 pvalue Px 25 P z Pz 3.83 .5 .4999 .9999 . Since this is 7.5 above the significance level, accept H 0 .