Calculating the Probability of a Type II Error

To properly interpret the results of a test of hypothesis requires that you be able to judge the p-value of the test. However, to do so also requires that you have an understanding of the relationship between Type I and Type II errors. Here, we describe how the probability of a Type II error is computed. A Type II error occurs when a false null hypothesis is not rejected. For example, if a rejection region is as follows: xbar < 127.06 or xbar > 132.94 and the null hypothesis is false, then the probability of a Type II error is defined as β = P(127.06 < xbar < 132.94 (given that H0 is false) The condition that the null hypothesis is false only tells us that the mean is not equal to 130. If we want to compute β , we need to specify a value for µ . Suppose that we want to determine the probability of making a Type II error when, in actual fact, µ = 135, 131, 139, and/or any other value.

1

Because this error is quite costly.A Windmill Example: The feasibility of constructing a profitable electricity-producing windmill depends on the average velocity of the wind. is there sufficient evidence to conclude that the average wind velocity exceeds 20 mph? We want to test the following hypotheses. a Type I error is committed (rejecting the null hypothesis when it is true). even though the site is a good one.01. For a certain type of windmill. To judge the effectiveness 2 . But suppose that a site where the wind velocity is greater than or equal to 25 mph is extremely profitable. 50 readings of the wind velocity are taken. is the site feasible? That is. we would conclude mistakenly that the average wind velocity does not exceed 20 mph. when the test is conducted. we would conclude mistakenly that the average wind velocity exceeds 20 mph. As a result. α = 0. and the average is calculated. H0: A ≤ 20 HA: A > 20 If. The cost of this error may not be very large. the search for a good site would simply continue. The consequence of this decision is that the windmill would be built on an inappropriate site. since. To test whether or not a particular site is appropriate for this windmill. The test is designed to answer the question. if the site under consideration is judged to be inappropriate. If a Type II error is committed (not rejecting the null hypothesis when it is false). the average wind speed would have to exceed 20 mph in order for its construction to be feasible. we would not build the windmill on that site. we specify a small value for a.

05 1.32 -0.62) = 0.95-25) / (12/√50)] = P(z < -0.2676 0.95 0.697 1.5 – 0.95 23.) Our first task is to set up the rejection region in terms of xbar.95 22 22.95 23.55 -3.697 -0.95 23.62 0.01 and n = 50 is appropriate).6064 0.5 26 26.45 -0.697 1.27 -0.95 Thus: β = P(xbar < 23.9900 in Table) So we have z = (xbar-µ ) / (σ /√n) = (xbar-20) / (12/√50) > 2.50 -1.2123 0.5 27 1.8023 0.56 0.95 25 -1.3023 0.7123 0.85 0.of this test (to determine if our selection of α = 0.15 0. we compute the probability of committing this error.3749 0.1131 0.05 1.3869 0.03 -0.95 23. Our task is to calculate β when µ = 25.95 23.3745 0.697 1.4332 0.05 -0.95 23.2672 23.0120 0.95 23.1255 23.2324 = 0.697 1.33 (look up 0.80 0.01 = 2.95 23.697 1.95 (given that µ = 25) = P{[(xbar-µ ) / (σ /√n)] < [(23.4880 0.05 -2.697 1.91 -1.95 23.4641 0.45 0.3186 0.21 -1.5 25.697 1.95 Region where H0 is not rejected: xbar < 23.697 1.0668 0.697 1.5 23 23.55 -1. Rejection region: z > zα = z0.5 24 24.33 Rejection region: xbar > 23.1064 0.55 -2.0359 3 .697 1.1814 0. (Assume that we know that (σ = 12 mph.2324 0.95 1.8749 0.

17 24.4 0.2 1 0.5: 1.8 0. If this probability is considered too large.10 and leave n = 50.28 ⇒ xbar > 22.5 -2.0853 4 . This means that.6 0. then β = 0.33 1.2676 (see above Figure). there is a 26.0475.2 0 The probability of not rejecting the null hypothesis when µ = 25 is 0. when the mean wind velocity is 25 mph.76% probability of erroneously concluding that the site is not profitable. if we increase a to 0.This is the graph for β associated with numbers from 18 to 32. we can reduce it by either increasing α or increasing n.697 -1.17 22. For example.37 0.4147 0. Rejection region: (xbar-20) / (12/√50) > 1.

20 1.17 -0.0675 0.3413 0.796 22.0329 5 .20 1.5000 0.796 23 23.17 22.0329.20 1.704 -2. 22.4962 0.2224 0.00 -1.704 -3.0475 25.50 0.17 1.0778 0.204 1.0038 0.204 -1.83 1.697 -1.204 -3.4525 0.5 27 -0.204 1.20 1.20 1.0122 0.5 24 24.5 -3.20 1.796 22.796 22.20 -0.8 0.84 0.67 -3.796 25 -2.796 22.4750 0.704 -1.0010 0.4990 0.6 0.697 -1.20 -1.204 -0.796 22.10.20 1. If we let α = 0.01 but increase n to 100.5 25. then β = 0.704 -4.4671 0.4325 0.96 0.796 22.0000 22.0250 25 With α = 0.2776 0.4 0.2 0 25 -2. the probability of building on a site that is not profitable is too large.2 1 0.25 -2.4878 0.796 22.22. however.09 -3.67 0.42 -2.59 -1.1587 0.33 1.5 26 26.4222 0.

8 0.4 0.2676 = 0.6 0.7324. but the cost of sampling has increased.1. the cost of sampling is small in comparison to the costs of making Type I and Type II errors in this situation.01 is 1 0. Another way of judging a test is to measure its power --the probability of its leading us to reject the null hypothesis when it is false-rather than measuring the probability of a Type II error. the power of the test is equal to 1 .β . Thus. In the present example. Nonetheless.2 0 Now both α and β are quite small.2 1 0. the power of the test with n = 50 and α = . 6 .

sample size. ASSIGNMENT: In the windmill example presented in class. we would naturally prefer to use the test that is correct more frequently.8 0. the first test is said to be more powerful. and n = 125. To determine the appropriate sample size for specified levels of the Type I and Type II Errors. consult the Text. If (given the same alternative hypothesis. and significance level) one test has a higher power than a second test. 7 .4 0. Compute and display the Beta and Power functions for n = 25.1.2 0 When more than one test can be performed in a given situation. Briefly discuss your results. Display your results in no more than two graphs. the Beta and Power functions are computed for n = 50.2 1 0.6 0. n = 75.