252solnC 2/13/08 (Open this document in 'Page Layout' view!) C. POWER FUNCTIONS 1. A one-sided Test. Text 9.109 on CD (9.102), C1 2. A Two-Sided Test. C2 Exercise 9.109 (9.102 in 8th edition): A soft drink machine is supposed to dispense at leas 7oz of the drink with a standard deviation of 0.2 oz. A sample of 16 cupfuls is taken. If the probability of a type one error is set at 5%, compute the probability of a type two error and the power of the test if the actual mean is a) 6.9 oz. b) 6.8 oz. H : 7 Solution: Given: 0 , 0.2, n 16, .05, H 1 : 7 0.2 so x 0.05 . a) First, state the problem and find a critical value or values. Since this is n 16 a one-sided test, the formula for a two-sided critical value x cv 0 z x becomes xcv 0 z x , so 2 that xcv 7 1.645 0.05 6.918 . So we will not reject H 0 if the sample mean x is greater than or equal to 6.918. Make a diagram. Put 7 in the middle and show a 'reject' region below 6.918. Shade this area to represent the significance level. a) 1 6.9 . We will not reject the null hypothesis if the sample mean is at least 6.918, so our probability of a type II error is the probability that the sample mean is below 6.918 when the population mean is 6.9. 6.918 6.9 Px 6.918 6.9 P z Pz 0.36 .5 .1406 . .3594 . Power 1 .6406. 0.05 6.918 6.8 Pz 2.36 .5 .4909 .0098 . b) 1 6.8 Px 6.918 6.8 P z 0.05 Power 1 .9909. Problem C1: Assume that 4 and n 70 . Find the critical values, power function and operating characteristic curve for: H 0 : 50 Use a significance level of 5 percent. H 1 : 50 Solution: a) First, state the problem and find a critical value or values. H 0 : 50 4 4, n 70, .05 so x 0.47809 . Since this is a one-sided test, the n 70 H 1 : 50 formula for a two-sided critical value x cv 0 z x becomes xcv 0 z x , so that 2 xcv 50 1.645 0.47809 49.2135 . So we will not reject H 0 if the sample mean x is greater than or equal to 49.2135. Make a diagram. Put 50 in the middle and show a 'reject' region below 49.2135. Shade this area to represent the significance level. b) Decide on what values of 1 to use to compute , the probability of a type II error. The usual set of values includes the mean from the null hypothesis, the critical value, a point about midway between these values and two points, one further out beyond the critical value by a distance equal to the distance between the null hypothesis mean and the critical value, and another halfway between this point and the critical value. We thus choose 50, 49.2135, and 49.6, which is about halfway between them. Since the difference between 50 and 49.2135 is about 0.8, the lowest value of 1 that we use is 48.4, and a point about halfway between 48.4 and 49.2135 is 48.8. 252solnC 2/13/08 (Open this document in 'Page Layout' view!) c) Compute for each value of 1 . Since a type II error is wrongly ‘accepting’ the null hypothesis, we compute the probability that the sample mean will be above or equal to the critical value for each value of x 1 1 . Our computations are below. Note that, in general, for this one-sided hypothesis P z cv . x 49 .2135 50 Px 49 .2135 50 P z 1 50 Pz 1.645 .95 .47809 power 1 .05 49 .2135 49 .6 Pz 0.81 .2910 .5 .7910 .47809 power 1 .2090 Make a diagram. Use the diagram from part a) and superimpose a second identical Normal curve centered at 1 49.6 . Shade the area to the right of 49.2135 under the second curve in the opposite direction to your shading in a) to represent , the operating characteristic. 1 49.6 Px 49 .2135 49 .6 P z 1 49.2135 Px 49 .2135 49 .2135 P z 49 .2135 49 .2135 Pz 0 .5000 .47809 power 1 .5000 1 48 .8 Px 49 .2135 48 .8 P z 49 .2135 48 .8 Pz 0.86 .5 .3051 .1949 .47809 power 1 .8051 1 48.4 Px 49 .2135 48 .4 P z 49 .2135 48 .4 Pz 1.70 .5 .4554 .0446 .47809 power 1 .9554 Make a diagram. Put 0 to 1 on your y axis and 48.4 to 50 on your x axis. Graph one line representing and one representing power. They should cross at 49.2135. Problem C2: A hardware firm charges a flat rate for mailing of small tools based on an average weight of 20 oz. with a standard deviation of 3.60 oz. A consultant challenges this assumption and a sample of 100 packages is taken. Find critical values for a significance level of 1% and compute the power function and operating characteristic curve. Solution: a) First, state the problem and find a critical value or values. H 0 : 20 3.60 3.60, n 100 , .01 so x 0.360 . Since this is a two sided test, the H : 20 n 100 1 formula for a critical value is x cv 0 z x , so that xcv 20 2.576 0.360 20 0.927 . So we will 2 not reject H 0 if the sample mean x is between 19.073 and 20.927. Make a diagram. Put 20 in the middle and show two ‘reject’ regions, one below 19.073 and one above 20.927. Shade these areas to represent the significance level. b) Decide on what values of 1 to use to compute , the probability of a type II error. The usual set of values includes the mean from the null hypothesis, the critical values, a point about midway between these values and two points, one further out beyond the critical value by a distance equal to the distance between the null hypothesis mean and the critical value, and another halfway between this point and the critical value. We thus choose the null hypothesis mean, 20, and the two critical values 19.073 and 20.927.20.5 and 21.5 are about halfway between 20 and the critical values. Since the difference between 20 and the critical values is about 1.0, the lowest value of 1 that we use is 18.0 and the highest is 22.0. Points about halfway between these numbers and the critical values are 18.5 and 21.5. 252solnC 2/13/08 (Open this document in 'Page Layout' view!) c) Compute for each value of 1 . Since a type II error is wrongly ‘accepting’ the null hypothesis, we compute the probability that the sample mean will be between the critical values for each value of 1 . Our x 1 x 1 computations are below. Note that, in general, for a two-sided hypothesis P cv1 z cv 2 . x x 20 .927 20 19 .073 201 1 20 P19 .073 x 20 .927 20 P z 0 . 360 0.360 P2.575 z 2.575 2.4950 .99 1 20 .927 20 .5 19 .073 20 .5 z 0.360 0.360 P 3.96 z 1.19 .5 .3830 .8830 Make a diagram. Use the diagram P19 .073 x 20 .927 20 .5 P 1 20.5 or 19.5 from part a) and superimpose a second identical Normal curve centered at 1 20 .5 . Shade the area between 19.073 and 20.927 under the second curve in the opposite direction to your shading in a) to represent , the operating characteristic. 1 20.927 or 19.073 P19.073 x 20.927 20.927 20 .927 20 .927 19 .073 20 .927 P z 0.360 0.360 P 5.15 z 0.00 .5000 20 .927 21 .5 19 .073 21 .5 z 0.360 0.360 P19 .073 x 20 .927 19 .5 P 1 21 .5 or 18 .5 P 6.74 z 1.59 .5 .4441 .0559 20 .927 22 .0 19 .073 22 .0 z 0.360 0.360 P19 .073 x 20 .927 22 .0 P 1 22.0 or 18.0 P 8.13 z 2.98 .5 .4986 .0014 If we round these results, we get the following values for the operating characteristic and power: 22.0 21.5 20.9 20.5 20.0 19.5 19.0 18.5 1 power .00 1.00 .06 .94 .50 .50 .88 .12 .99 .01 .88 .12 .50 .50 .06 .94 18.0 .00 1.00 Make a diagram. Put 0 to 1 on your y axis and 18 to 22 on your x axis. Graph one line representing and one representing power. They should cross at 19.073 and 20.927.