English

not defined

no text concepts found

MATH 2441 Probability and Statistics for Biological Sciences Tests Of Hypotheses Involving the Proportion of a Single Population The procedures for testing hypotheses involving the proportion of a single population follow from the properties of the sampling distribution of the sample proportion described earlier in the document on confidence interval estimates of the proportion of a single population. Specifically, we will deal with hypotheses which involve the null hypothesis H0: = 0 where 0 is some specified value in the range 0 to 1. The so-called large sample case (the only case we will deal with here) occurs when n 0 5 n(1 - 0) 5 and (SPHT - 1) That is, we have a large sample case when we "expect" that if H 0 were true, our sample would contain at least five items in the category of interest and at least five items which are not in the category of interest. Under these circumstances, the sample proportion is approximately normally distributed with mean p the population proportion, and standard deviation p 1 n Thus, the standardized test statistic z p 0 p p 0 (SPHT - 2) 0 1 0 n can be used as the basis of the hypothesis test. The rules are summarized as Table 1. Hypotheses: H0: = 0 HA: > 0 reject H0 at a level of significance if: z > z (single-tailed rejection region) H0: = 0 HA: < 0 z < -z (single-tailed rejection region) Pr(z < test statistic value) H0: = 0 HA: 0 z > z/2 or z < -z/2 (two-tailed rejection region) 2Pr(z > test statistic value) p-value Pr(z > test statistic value) You should recognize that this is essentially identical to Table 1 in the previous document dealing with tests of hypotheses about the mean of a single population in the large sample case, except that the symbol has been replaced by the symbol . This illustrates the advantage of expressing the rejection criteria and p© David W. Sabo (2000) Hypothesis for Single Population Proportions Page 1 of 9 value formulas in terms of a standardized test statistic -- then any hypothesis test procedure that can make use of that standardized test statistic will essentially reduce to the rules in Table 1 above. Note that in calculating the standard error of the sampling distribution, p, we use 0 instead of the sample proportion, p. This is because the logic behind the test is that we assume H0 is true until the data forces us to conclude otherwise. But, if H0 is true, then we don't need to use p as an estimate of , since H0 gives us the value of . Type 2 Error Probabilities, Power, and Sample Sizes With the help of formula (SPHT - 2) and the formulas in Table 1, we can use the usual approach to develop formulas for the type 2 error probability, ( = ), the power of the test, 1 - , and estimates of the required sample size to achieve pre-selected type 1 and type 2 error probabilities. In the case of a right-tailed test, the development of the requisite formulas is illustrated in the following two figures: ( = ) area = area = p z do not reject H0 reject H0 z 0 do not reject H0 reject H0 0 + z·p The rejection criterion, z > z, becomes p 0 z p p 0 z p or But, now, suppose instead that = > 0 is true. Then, if H0 is not rejected, a type 2 error will occur. The probability of this happening is Pr 0 z 0 1 0 n when 0 1 0 0 z n Pr z 1 n (SPHT - 3) This last form is obtained by converting the previous p probability into the corresponding z probability, using (SPHT - 2), but with 0 replaced by , the value of now supposed to be true. The power of the hypotheses test under these circumstances will then just be one minus the value of this latter expression. Furthermore, if we wish to have ( = ) = , some preset value, then the quotient in brackets in (SPHT - 3) must be less than -z: Page 2 of 9 Hypothesis for Single Population Proportions © David W. Sabo (2000) 0 1 0 n z 1 n 0 z We can solve this inequality for n, the required sample size, to get z 0 1 0 z 1 n 0 2 (SPHT - 4) This formula has all the features of the sample size formulas derived for testing hypotheses involving the mean of a single population. The value of n is greater for smaller values of and/or , because the corresponding values of z and/or z would then be larger, increasing the size of the numerator in the brackets. Similarly, if the distinction being drawn, - 0, becomes smaller, the required value of n will increase because the denominator of the quotient in brackets in (SPHT - 4) gets smaller, thereby increasing the size of the quotient itself. The square-rooted expressions in the numerator of (SPHT - 4) play the role of the standard deviation when dealing with population proportions, and as either 0 or get closer to the "worst case" value of 0.5, these factors in the two terms will increase in value, causing the overall value computed for n to become larger as well. [NOTE: be careful not to "simplify" this expression by squaring the numerator term-by-term. The result of (SPHT - 4) is not the same thing as z n 0 1 0 2 z 0 2 n z 2 0 1 0 1 2 z2 1 WRONG!!! 0 2 You must calculate the expression (SPHT - 4) just exactly as it is written -- do the entire value inside the square brackets first, and then square the result.] The corresponding formulas for a left-tailed test are Pr 0 z 0 1 0 n when 0 0 1 0 0 z n Pr z 1 n (SPHT - 5) and z 0 1 0 z 1 n 0 2 (SPHT - 6) The only difference between (SPHT - 4) and (SPHT - 6) is the reversal of the two symbols in the denominator. Finally, for a two-tailed test, we get © David W. Sabo (2000) Hypothesis for Single Population Proportions Page 3 of 9 0 1 0 0 1 0 Pr 0 z / 2 0 z / 2 n n when 0 1 0 0 z / 2 0 1 0 0 z / 2 0 n n Pr z 1 1 n n (SPHT - 7) and z / 2 0 1 0 z 1 n 0 2 (SPHT - 8) Formula (SPHT - 7) may look rather horrifying, but if you take it apart piece by piece, you'll see that it's just your "typical" normal probability calculation using the equivalent of (SPHT - 2) to convert the initial p probability into the corresponding z probability. Before leaving this topic, we illustrate the use of these formulas with several examples. Example 1: A biotechnologist is working on a project to develop a variety of a food plant genetically engineered to resist attack by a particular virus. The company proceeds to large-scale trials with any variant in which 80% or more of the plants are resistant. For one particular variant, they find that 212 of 250 randomly selected plants from a collection of small test gardens are resistant. Should they proceed to largescale trials for this variant? Solution "Should they proceed?" will be answered "Yes" if they can reject the null hypothesis in H0: = 0.80 vs. HA: > 0.80 where is the proportion of the population of these plants which is resistant to the virus. If H0 is true, samples of 250 plants are expected to average 0.8 x 250 = 200 plants (more than 5) which are resistant to the virus, and so, it is also expected to average 50 plants (more than 5) which are not resistant to the virus. Thus, the conditions for the large sample case are satisfied, and so we can use the formulas described earlier in this document. The sample proportion is p 212 0.848 250 Since 0 = 0.80, the standardized test statistic is obtained as z 0.848 0.800 0.80 0.20 0.048 1.897 0.0253 250 Since we are doing a right-tailed test, we can calculate the p-value as p-value = Pr(z > 1.897) 0.5 - 0.4713 = 0.0287. Page 4 of 9 Hypothesis for Single Population Proportions © David W. Sabo (2000) This p-value is well below the conventional target value of 0.05, and so the company is justified in rejecting H0 on the strength of the data, and concluding that the proportion of this variant of the plant which is resistant to the virus is greater than 0.80. Thus, they should proceed to large-scale trials with this variant of the plant. Note the following with respect to the situation described in this example. Since p depends only on the value of 0, the value of stated in the null hypothesis, and on the value of n, and not on any other values observed as part of the experiment, this company could develop a simple "rule of thumb" for dealing with samples consisting of 250 plants. For = 0.05, rejection of the null hypothesis requires that z p 0.80 0.80 0.20 1.645 z 0.05 250 or p > 0.8416 Thus, they should proceed to large-scale trials whenever a sample of 250 plants contains x > (250)(0.8416) = 210.40 plants. That is, if the random sample of 250 plants contains 211 or more which are resistant to the virus, then they should proceed to large-scale trials. With this rule of thumb, they don't have to go through the formal hypothesis test procedure with every plant variant, as long as the sample sizes are kept at 250. Example 2: A food technologist is testing a new process for preparing a particular kind of fruit for canning. Typically, 10% of the cans of the fruit prepared using the current process show visible discoloration after 90 days. She selects a random sample of 225 cans prepared with the new process and finds that after 90 days, only 17 cans show signs of discoloration. Does this data allow us to say that the new process makes a difference in the proportion of cans that tend to discolor within 90 days? Solution The phrase "makes a difference" tells us immediately that a two-tailed test must be used here. Since with the current process, 10% of the cans discolor, we need to compare the proportion of cans discoloring after the new process with the value 0.10. Thus, the hypotheses to be tested are: H0: = 0.10 vs. HA: 0.10 where is the proportion of the population of cans prepared with the new process that show visible discoloration after ninety days. We note that if H0 is true, samples of 225 cans are expected to average 22.5 cans with discolored fruit (which is more than 5) and so average 202.5 cans without discolored fruit (which is also more than 5), so we are justified in using the large sample formulas described earlier. Further, since no level of significance is specified, we will use = 0.05. Thus, the null hypothesis can be rejected at a level of significance of 0.05 if the standardized test statistic, z, has a value satisfying z > z0.025 = 1.96 or z < -z0.025 = -1.96. Now, the sample proportion, p, is p 17 0.0756 225 © David W. Sabo (2000) Hypothesis for Single Population Proportions Page 5 of 9 and so z 0.0756 0.100 0.10.9 1.22 225 Since -1.22 is neither greater than 1.96, nor is it less than -1.96, we are unable to reject the null hypothesis here. Thus, we cannot conclude from this data that the new process makes any difference in the proportion of cans of fruit that show discoloration after 90 days. Example 2A: What is the probability that the proportion of cans showing discoloration after ninety days could be 0.08, say (or two percentage points lower than the current 10% rate), despite the fact that the hypothesis test in Example 2 indicated no difference could be detected? Solution This question is really asking for the probability that a type 2 error would have occurred in the non-rejection of H0 in Example 2 even if the true proportion of discolored cans prepared with the new process was just 0.08 or 8%. We can calculate this directly using formula (SPHT - 7) with 0 = 0.10, = 0.08, and n = 225: 0.10 0.90 0.10 0.08 1.96 0.10 0.90 0.10 0.08 1.96 225 225 0.08 Pr z 0.08 0.92 0.08 0.92 225 225 Pr(-1.06 z 3.27) 0.3554 + 0.4995 = 0.8549 (**) This seems to be a very large probability of making such a type 2 error. It is saying that even if the proportion of discolored cans dropped from 10% down to 8%, which seems to be drop that would be quite significant in practice, the hypothesis test above is almost certain to miss detecting such a change. Does this seem reasonable? Unfortunately, the answer is: yes. Because we have a precise, and not too complicated, formula for the normal probability density curve, it is actually not too hard to plot an accurate diagram of what's really happening here. Referring back to the document introducing the normal distribution, we see that we can write f p 1 2 p e p p 2 / 2p2 (SPHT - 9) where p and p 1 n (SPHT - 10) as stated near the beginning of this document. Note that the "" showing explicitly in formula (SPHT - 9) is the mathematical constant, not the population proportion. However, the "" showing in formulas (SPHT - 10) stands for the population proportion. Anyway, substituting into formulas (SPHT - 10), we get: Page 6 of 9 Hypothesis for Single Population Proportions © David W. Sabo (2000) = 0 = 0.10 p = 0.10, p = 0.02 = = 0.08 p = 0.08, p 0.01809 and Now, we can substitute each of these sets of numbers (and n = 225) into formula (SPHT - 9) and plot the probability density curve. (It would be kind of tedious, though not difficult, to do this with a hand calculator and an ordinary piece of graph paper. However, you could also use a computer application such as Excel/97 to very quickly generate the plots.) Putting both density curve plots on the same graph, we end up with the figure to the right. This figure should have quite an accurate scale, though notice that the horizontal scale more than 100 times finer than the vertical scale, covering an interval of about 0.18 units vs the vertical scales interval of about reject H0 reject H0 25 units -- if we drew the vertical scale as large as the horizontal scale, this figure would be about 150 times as tall. These are really very narrow, very tall bell curves! 20 10 p 0 0.1 The dotted bell shape is the probability density curve for the sample proportion, p, when the population proportion, , is 0.10 -- that is, when H0 in this example is correct. The rejection region for H0 is determined by this curve. We used = 0.05, so that H0 would be rejected only if either z > z/2 = 1.96 p z / 2 p 0.10 1.96 0.02 0.1392 z < -z/2 = -1.96 p z / 2 p 0.10 1.96 0.02 0.0608 or These two numbers locate the boundaries of the right and left parts of the rejection region. That means that the shaded tails under the dotted curve in the figure cut off by these values each have an area of 0.025, for a total area of 0.05, the value of . The solid-line curve is the probability density curve for the sample proportion, p, when the population proportion, , is 0.08. Notice that consistent with 0.08 being slightly closer to zero than is 0.10, this density curve is a bit narrower and taller. This curve shows the distribution of sample proportion values when the true population proportion is really 0.08 rather than 0.10. Here's the point, though. The probability of making a type 2 error in the original hypothesis even when = 0.08 is the area under this solid-line curve over the non-rejection interval, and you see that this includes most of the area under that curve. For the sample size n = 225, there is just too much overlap between these two distribution curves to be able to detect the difference of centers being shifted 0.02 units to the left with any reliability. We might say that, as a result, this hypothesis test has "low power" to detect a decrease in from the value 0.10 to 0.08, even though in a relative sense that might be quite a practically significant difference. Of course, the way to "fix" this problem is to take a larger sample. If we wished to carry out the original hypothesis test with = 0.05 and ( = 0.08) = 0.05, say, then formula (SPHT- 8) says we must use as sample size, the value 1.96 0.10 0.90 1.645 0.08 0.92 2674 .3 n 0.10 0.08 2 That is, using a sample of 2675 or more cans of this fruit, we can test the original hypotheses at a level of significance of 0.05, and the probability that H0 will not be rejected when the true population proportion of cans discoloring is 0.08 will be only 0.05 as well. This would lead to an acceptably sensitive test procedure, © David W. Sabo (2000) Hypothesis for Single Population Proportions Page 7 of 9 no doubt, but the cost is obvious. The sample size has been increased over the original experiment by a factor of more than 10. A person could probably open and inspect 225 cans of fruit in one hard-day's work. But opening and inspecting 2675 cans of fruit would be a major project, and might well be prohibitive in cost and time in this context. By the way, before leaving this example, can you picture why the larger sample size, n = 2675, would solve the problem that originally shows up in the result labeled (**) above -- that it really does result in the type 2 error probability ( = 0.08) being just 0.05? We won't attempt to draw the equivalent of the figure above for this case because on the same horizontal scale, the result would be a graph that is nearly four times as high (the = 0.08 probability density curve would have a maximum at a vertical position of about 76, rather than at the vertical position 22 as in the figure above). However, what you'd see if we did is two much higher and much narrower bell shapes, with very little overlap as a result. In fact, the boundaries of the rejection region for H0 would now be 0.0886 and 0.1114, and the value p = 0.0886 would be cutting off a right-hand tail in the = 0.08 curve of area 0.05 (rather than of area 0.8549 as in the figure above). In fact, using n = 2675, formula (SPHT - 7) gives ( = 0.08) = Pr(1.645 z 5.98) = 0.5 - 0.4500 = 0.05 as desired. Example 3: According to a simple Mendelian inheritance model, 25% of a population of insects should exhibit a certain recessive trait. Does the observation that 21 of a random sample of 100 such insects exhibit this trait contradict the simple Mendelian model? Solution The simple Mendelian model amounts to stating that = 0.25, where is the proportion of the insects exhibiting the recessive trait of iinterest. Therefore, the Mendelian model is contradicted if we can reject the null hypothesis when testing H0: = 0.25 vs HA: 0.25 We use a two-tailed test here, because the model will be contradicted if the evidence indicates is either smaller than 0.25 or greater than 0.25 -- if either too many of the insects or too few of the insects exhibit this trait. Now, the large sample case applies here, since the null hypothesis leads us to expect 25 insects with the trait and so 75 without the trait in the sample, and both numbers are greater than or equal to 5. Thus, the standardized test statistic value is z 0.21 0.25 0.25 0.75 0.92 100 This seems like a small number, so we'll calculate a p-value: p-value = 2Pr(z > -0.92) = 2Pr(z > 0.92) = 2( 0.5 - 0.3212) z = 0.3576. This is indeed a much too large value to permit rejection of H0. Therefore, the "conclusion" is that Page 8 of 9 -0.92 Hypothesis for Single Population Proportions 0.92 © David W. Sabo (2000) these observations are not adequate evidence to conclude that the simple Mendelian model is violated here. The determination of whether or not data on genotype/phenotype frequencies is consistent with theoretically expected frequencies is an important problem in biotechnology, and biological sciences in general. More elaborate inheritance models can be tested using "goodness-of-fit" tests based on the 2-distribution, considered in a later section of this course. © David W. Sabo (2000) Hypothesis for Single Population Proportions Page 9 of 9