Hypothesis Testing for Proportions
- Benjamin Chen
- 2022年9月8日
- 讀畢需時 4 分鐘
已更新:2024年1月22日
This story will discuss the details of hypothesis testing for proportions. I have already gone into the specifics of hypothesis testing in previous stories, so if you haven't studied them yet, please take a look at them first.
In the last story, we also saw how we could:
build the sampling distribution for the sample proportion
perform confidence interval estimation for the population proportion
determine the appropriate sample size for proportion estimation
All of these topics lead to this final topic on hypothesis testing for proportions. So let's get started!
Hypothesis Testing for Population Proportion
The intuition behind hypothesis testing for a population proportion is quite simple. The idea is the exact same as hypothesis testing for a population mean. In the context of proportion, we hope to use a sample proportion to test out whether a claim about the population proportion is believable.
The four steps of hypothesis testing for a population proportion are also the same.
Define Hypotheses
Check Conditions
Compute Test Statistic (compare to critical value)
Conclude
Perhaps, it's easiest to demonstrate with an example.
The manager of Pizza Delight claims that at least 95% of its orders are delivered within 15 minutes of the time the order is placed. A random sample of 150 orders revealed that 138 were delivered within the promised time. Test the manager’s claim at the 0.1 level of significance.
We hope to test the manager's claim that 95% of its orders are delivered within 15 minutes of time. This means that, if the manager's claim is correct, approximately 142.5 out of the 150 orders should deliver on time. The random sample at hand, however, reports that only 138 out of the 150 orders were delivered on time. We need to perform a hypothesis test to see whether this sample statistic (138/150) is enough evidence to topple the manager's claim about the population proportion (π=0.95).
Step 1: Define Hypotheses
Let's first assume that manager's claim that π=0.95 is indeed correct. This becomes our null hypothesis and we could then define our alternative hypothesis as well.

Step 2: Check Conditions
Then we check our conditions to ensure that the sampling distribution of sample proportion is normal. You should recall from the last story that the three conditions are:

If the three conditions are met, you can conclude that the sampling distribution of sample proportion is normal, which enables you to perform hypothesis testing.

The three conditions are met as calculated below:

Now, you may also recall from hypothesis testing for mean that we have to then check whether the population standard deviation is known or not. If the population standard deviation is known, then we perform the Z test. If the population standard deviation is unknown, then we perform the t-test. This is where things become slightly different for hypothesis testing for proportions.
There is no such thing as a population standard deviation for proportions because we are dealing with categorical variables here.
Therefore, for hypothesis testing for proportion, you will always resort to a Z test. A t-test does not exist for hypothesis testing for proportion.
Step 3: Compute Test Statistic (compare to critical value)
The computation for the Z test statistic is:

In case you're wondering where this formula came from, it's actually the same formula as all of the Z values except we substituted in the mean and standard deviation of the sampling distribution (for sample proportion). (below)

In our example, we can plug in the values to find the Z test statistics.

After we found our Z test statistic, we compare it to the critical value to see whether it falls into the rejection region. This is a two-tail test at a 0.1 level of significance, meaning the critical value is ±1.645. The Z test statistic is slightly smaller than the lower boundary of the critical value, indicating that it does fall into the rejection region.
Step 4: Conclude
Because the test statistic falls into the rejection region, we have to "reject" the null hypothesis. We can conclude that there is significant evidence that the true population proportion of on-time delivery is not what the manager claims to be, at 95%.
P-value Approach
Now let's also approach this example using the p-value approach. For the p-value approach, we compare the level of significance to the p-value.
We can find the p-value by looking at the Z-table. The area under the curve to the left of Z-value -1.69, which is our Z test statistic, is 0.0455.

But remember that this is a two-tail test, so we have to multiply this value by 2 to find the p-value.

The p-value is 0.091, which is smaller than the level of significance of 0.1. This means that the Z test statistic falls inside the rejection region. The outcome of the p-value approach is the same as that of the critical value approach. We reject the null hypothesis and conclude that there is significant evidence that the true population proportion of on-time delivery is not what the manager claims to be, at 95%.
Conclusion
Yes! You did it! You have just completed the last story to this series of introductory statistics. In this story, we covered the steps of performing a hypothesis test for proportions. Most of the important concepts were already covered in the previous stories, so this one was more of a quick review with some slight modifications. I hope you learned a ton and that these materials helped you during your studies. If you've already mastered everything in this series, you may move on to the next series on regression!



留言