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
17582_05_ch05_p221-289.qxd 11/25/08 3:35 PM Page 245 5.5 Choosing the Sample Size for Testing m 5.5 245 Choosing the Sample Size for Testing M The quantity of information available for a statistical test about m is measured by the magnitudes of the Type I and II error probabilities, a and b(m), for various values of m in the alternative hypothesis Ha. Suppose that we are interested in testing H0: m m0 against the alternative Ha: m m0. First, we must specify the value of a. Next we must determine a value of m in the alternative, m1, such that if the actual value of the mean is larger than m1, then the consequences of making a Type II error would be substantial. Finally, we must select a value for b(m1), b. Note that for any value of m larger than m1, the probability of Type II error will be smaller than b(m1); that is, b(m) b(m1), for all m m1 Let m1 m0. The sample size necessary to meet these requirements is n s2 (za zb)2 ∆2 Note: If s2 is unknown, substitute an estimated value from previous studies or a pilot study to obtain an approximate sample size. The same formula applies when testing H0: m m0 against the alternative Ha: m m0, with the exception that we want the probability of a Type II error to be of magnitude b or less when the actual value of m is less than m1, a value of the mean in Ha; that is, b(m) b, for all m m1 with m0 m1. EXAMPLE 5.11 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 of approximately .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 m is less than 16.37—that is, to test H0: m 16.37 Ha: m 16.37 with a .05. If the true mean weight is 16.27 or less, the manufacturer needs the probability of failing to detect this underfilling of the boxes with a probability of at most .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 a .05 and b(m) less than .01 whenever m is less than 16.27 ounces. Solution We have a .05, b .01, 16.37 16.27 .1, and s .225. Using our formula with z.05 1.645 and z.01 2.33, we have n (.225)2(1.645 2.33)2 79.99 80 (.1)2 Thus, the manufacturer must obtain a random sample of n 80 boxes to conduct this test under the specified conditions. 17582_05_ch05_p221-289.qxd 246 11/25/08 3:35 PM Page 246 Chapter 5 Inferences about Population Central Values Suppose that after obtaining the sample, we compute y 16.35 ounces. The computed value of the test statistic is y 16.37 16.35 16.37 z .795 s 1n .225 180 Because the rejection region is z 1.645, the computed value of z does not fall in the rejection region. What is our conclusion? In similar situations in previous sections, we would have concluded that there is insufficient evidence to reject H0. Now, however, knowing that b(m) .01 when m 16.27, we would feel safe in our conclusion to accept H0: m 16.37. Thus, the manufacturer is somewhat secure in concluding that the mean fill from the examined machine is at least 16.37 ounces. With a slight modification of the sample size formula for the one-tailed tests, we can test H0: m m0 Ha: m m0 for a specified a, b, and , where b(m) b, whenever m m0 Thus, the probability of Type II error is at most b whenever the actual mean differs from m0 by at least . A formula for an approximate sample size n when testing a two-sided hypothesis for m is presented here: Approximate Sample Size for a Two-Sided Test of H0: 0 5.6 level of significance p-value s2 (z zb)2 ∆ 2 a2 Note: If s2 is unknown, substitute an estimated value to get an approximate sample size. n The Level of Significance of a Statistical Test In Section 5.4, we introduced hypothesis testing along rather traditional lines: we defined the parts of a statistical test along with the two types of errors and their associated probabilities a and b(ma). The problem with this approach is that if other researchers want to apply the results of your study using a different value for a then they must compute a new rejection region before reaching a decision concerning H0 and Ha. An alternative approach to hypothesis testing follows the following steps: specify the null and alternative hypotheses, specify a value for a, collect the sample data, and determine the weight of evidence for rejecting the null hypothesis. This weight, given in terms of a probability, is called the level of significance (or p-value) of the statistical test. More formally, the level of significance is defined as follows: 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, assuming that the null hypothesis is true. Thus, if the level of significance is a small value, then the sample data fail to support H0 and our decision is to reject H0. On the other hand, if the level of significance is a large value, then we fail to reject H0. We must next decide what is a large or small value for the level of significance. The following decision rule yields results that will always agree with the testing procedures we introduced in Section 5.5.