Sunday, May 17, 2020
Hypothesis Test for Comparing Two Proportions
In this article we will go through the steps necessary to perform a hypothesis test, or test of significance, for the difference of two population proportions.à This allows us to compare two unknown proportions and infer if they are not equal to each other or if one is greater than another. Hypothesis Test Overview and Background Before we go into the specifics of our hypothesis test, we will look at the framework of hypothesis tests.à In a test of significance we attempt to show that a statement concerning the value of a populationà parameter (or sometimes the nature of the population itself) is likely to be true.à We amass evidence for this statement by conducting a statistical sample.à We calculate a statistic from this sample.à The value of this statistic is what we use to determine the truth of the original statement.à This process contains uncertainty, however we are able to quantify this uncertainty The overall process for a hypothesis test is given by the list below: Make sure that the conditions that are necessary for our test are satisfied.Clearly state the null and alternative hypotheses. The alternative hypothesis may involve a one-sided or a two-sided test.à We should also determine the level of significance, which will be denoted by the Greek letter alpha.Calculate the test statistic. The type of statistic that we use depends upon the particular test that we are conducting.à The calculation relies upon our statistical sample.à Calculate the p-value. The test statistic can be translated into a p-value.à A p-value is the probability of chance alone producing the value of our test statistic under the assumption that the null hypothesis is true. The overall rule is that the smaller the p-value, the greater the evidence against the null hypothesis.Draw a conclusion. Finally we use the value of alpha that was already selected as a threshold value.à The decision rule is that If the p-value is less than or equal to alpha, then we reject t he null hypothesis. Otherwise we fail to reject the null hypothesis. Now that we have seen the framework for a hypothesis test, we will see the specifics for a hypothesis test for the difference of two population proportions.à The Conditions A hypothesis test for the difference of two population proportions requires that the following conditions are met:à We have two simple random samples from large populations.à Here large means that the population is at least 20 times larger than the size of the sample. The sample sizes will be denoted by n1 and n2.The individuals in our samples have been chosen independently of one another.à The populations themselves must also be independent.There are at least 10 successes and 10 failures in both of our samples. As long as these conditions have been satisfied, we can continue with our hypothesis test. The Null and Alternative Hypotheses Now we need to consider the hypotheses for our test of significance.à The null hypothesis is our statement of no effect.à In this particular type of hypothesis test our null hypothesis is that there is no difference between the two population proportions.à We can write this as H0: p1 p2. The alternative hypothesis is one of three possibilities, depending upon the specifics of what we are testing for:à Ha:à p1 is greater than p2. This is a one-tailed or one-sided test.Ha: p1 is less than p2. This is also one-sided test.Ha: p1 is not equal to p2. This is a two-tailed or two-sided test. As always, in order to be cautious, we should use the two-sided alternative hypothesis if we do not have a direction in mind before we obtain our sample.à The reason for doing this is that it is harder to reject the null hypothesis with a two-sided test. The three hypotheses can be rewritten by stating how p1 - p2 is related to the value zero.à To be more specific, the null hypothesis would become H0:p1 - p2 0.à The potential alternative hypotheses would be written as: Ha:à p1 - p2à 0 is equivalent to the statement p1 is greater than p2.Ha:à p1 - p2à à 0 is equivalent to the statement p1 is less than p2.Ha:à p1 - p2à à âⰠ0 is equivalent toà the statement p1 is not equal to p2. This equivalent formulation actually shows us a little bit more of what is happening behind the scenes.à What we are doing in this hypothesis test is turning the two parameters p1 and p2à into the single parameter p1 - p2.à We then test this new parameter against the value zero.à The Test Statistic The formula for the test statistic is given in the image above.à à An explanation of each of the terms follows: The sample from the first population has size n1.à The number of successes from this sample (which is not directly seen in the formula above) is k1. The sample from the second population has size n2.à The number of successes from this sample is k2.The sample proportions areà p1-hat k1 / n1à and p2-hat à k2 / n2 .We then combine or pool the successes from both of these samples and obtain:à à à à à à à à à à à à à à à à à à à à à à à à p-hat ( k1 k2) / ( n1 n2). As always, be careful with order of operations when calculating.à Everything underneath the radical must be calculated before takingà the square root. The P-Value The next step is to calculate the p-value that corresponds to our test statistic. We use a standard normal distribution for our statistic and consult a table of values or use statistical software.à The details of our p-value calculation depend upon the alternative hypothesis we are using: For Ha: p1 - p2à 0, we calculate the proportion of the normal distribution that is greater than Z.For Ha: p1 - p2à à 0, we calculate the proportion of the normal distribution that is less than Z.For Ha: p1 - p2à à âⰠ0, we calculate the proportion of the normal distribution that is greater than |Z|, the absolute value of Z.à After this, to account for the fact that we have a two-tailed test, we double the proportion.à Decision Rule Now we make a decision on whether to reject the null hypothesis (and thereby accept the alternative), or to fail to reject the null hypothesis.à We make this decision by comparing our p-value to the level of significance alpha. If the p-value is less than or equal to alpha, then we reject the null hypothesis. This means that we have a statistically significant result and that we are going to accept the alternative hypothesis.If the p-value is greater than alpha, then we fail to reject the null hypothesis. This does not prove that the null hypothesis is true. Instead it means that we did not obtain convincing enough evidence to reject the null hypothesis.à Special Note The confidence interval for the difference of two population proportions does not pool the successes, whereas the hypothesis test does.à The reason for this is that our null hypothesis assumes that p1 - p2 0.à The confidence interval does not assume this.à Some statisticians do not pool the successes for this hypothesis test, and instead use a slightly modified version of the above test statistic.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment