8.2 - Hypothesis Testing for a Proportion
Here we will be using hypothesis tests to compare a proportion in one group to a specified population proportion.
Examples: Research Questions
The following are research questions that could be answered using a hypothesis test for one proportion. In each case, we would test the hypothesis by comparing data from a sample to the hypothesized population parameter.
Babies. Is the proportion of babies born male different from .50?
Handedness. Are more than 80% of American’s right handed?
Ice cream. Is the percentage of Creamery customers who prefer chocolate ice cream over vanilla less than 80%?
Recall from the last section the five step hypothesis testing procedure that we will be using in this course:
Five Step Hypothesis Testing Procedure
- Check any necessary assumptions and write null and alternative hypotheses. The assumptions will vary depending on the test. The null and alternative hypotheses will also be written in terms of population parameters; the null hypothesis will always contain an equality (i.e., \(=\), \(\geq\), or \(\leq\)).
- Calculate an appropriate test statistic. This will vary depending on the test, but it will typically be the difference observed in the sample divided by a standard error. In this class we will see \(z\), \(t\), \(\chi ^{2}\), and \(F\) test statistics.
- Determine a p-value associated with the test statistic. This can be found using the tables in Appendix A or using Minitab Express.
- Decide between the null and alternative hypotheses. If \(p \leq \alpha\) reject the null hypothesis. If \(p>\alpha\) fail to reject the null hypothesis.
- State a "real world" conclusion. Based on your decision in step 4, write a conclusion in terms of the original research question.
Some steps may vary depending on the test. Let's walk through these five steps for specifically for comparing the proportion of one group to a specified value.
1. Check Any Necessary Assumptions and Write Null and Alternative Hypotheses.
As in previous lessons, the assumption is that both \(n \times p \geq 10\) and \(n \times (1-p) \geq 10\). Note that some textbooks use 15 instead of 10 believing that 10 is too liberal. We will continue to use 10 for our discussions.
In terms of the hypotheses, the null hypothesis will always contain an equality, the alternative hypothesis will never contain an equality. Below is a table with the possible combinations of null and alternative hypotheses. \(p_0\) is the hypothesized value of the population proportion.
Research Question | Is the proportion different from \(p_0\)? | Is the proportion greater than \(p_0\)? | Is the proportion less than \(p_0\)? |
Null Hypothesis, \(H_{0}\) | \(p=p_0\) | \(p\leq p_0\) | \(p\geq p_0\) |
Alternative Hypothesis, \(H_{a}\) | \(p\neq p_0\) | \(p> p_0\) | \(p< p_0\) |
Type of Hypothesis Test | Two-tailed, non-directional | Right-tailed, directional | Left-tailed, directional |
Note: Some statisticians (e.g., MyStatLab) will always use the equality (=) in the null hypothesis regardless of whether a one- or two-tailed test is being performed.
2. Calculate an Appropriate Test Statistic.
When testing on proportion, will be using a \(z\) test statistic using the following formula:
Test statistic: One Group Proportion
\[z=\frac{\widehat{p}- p_0 }{\sqrt{\frac{p_0 (1- p_0)}{n}}}\]
\(\widehat{p}\) = sample proportion
\(p_{0}\) = hypothesize population proportion
\(n\) = sample size
Note that this formula is actually the difference between the sample proportion and hypothesized population proportion divided by the standard error of \(\widehat{p}\). In doing so, this formula is finding the z score for the observed sample in terms of the hypothesized distribution of sample proportions.
3. Determine the p-value Associated with the Test Statistic.
Now, we use the test statistic that we computed in step 2 to determine the probability of obtaining a sample that deviates from the hypothesized population as much as or more than the sample that we have. In other words, given that the null hypothesis is true, the probability that a randomly selected sample of \(n\) would have a sample statistic as different as the one obtained (or more different) is the p-value.
Note that p-values are also symbolized by \(p\). Do not confuse this with the population proportion which shares the same symbol.
We can look up the p-value using the Standard Normal Table or using Minitab Express. If we are conducting a one-tailed test (i.e., right- or left-tailed), we look up the area of the sampling distbrution that is beyond our test statistic. If we are conducting a two-tailed (i.e., non-directional test) there is one additional step: we need to multiple the area by two to take into account the possibility of being in the right or left tail.
4. Decide Between the Null and Alternative Hypotheses.
We can decide between the null and alternative hypotheses by examining our p-values. If \(p \leq \alpha\) reject the null hypothesis. If \(p>\alpha\) fail to reject the null hypothesis. Unless stated otherwise, assume that \(\alpha=.05\).
When we reject the null hypothesis are results are said to be statistically significant.
5. State a "Real World" Conclusion.
Based on our decision in step 4, we will write a sentence or two concerning our decision in relation to the original research question.
The next few pages will walk you through a few full examples before you try some on your own.