9.5 Hypothesis Z-Test for a Single Proportion

Hypothesis testing for proportions will proceed much as it did for means, so as we continue to investigate hypothesis testing, focus on the parameter under consideration and assumptions that can be made. These will lead you to the appropriate hypothesis test statistic.

When we find a random sample and note the number of successes or failures, we are dealing with a binomial random variable, as long as each item is independent. Therefore, when our research question involves the population proportion, we will base the hypothesis test on the sample proportion. As we have discussed, for a large sample size, the Central Limit Theorem can be used to specify the distribution of the sample proportion.

\hat{p} \sim N\bigg(p, \sqrt{\frac{p(1-p)}{n}}\bigg)

You might recall, when we were creating the confidence interval for the population proportion, we needed the population proportion in order to specify the margin of error, which was impossible because it was exactly the thing we were trying to estimate! Because the sample proportion had to be used instead, which introduced additional variation, the Agresti-Coull Method was created to produce a more reliable confidence interval. We will not have this same problem when we need to conduct a hypothesis test for a proportion. Because the null distribution is formed by assuming the null hypothesis is true, the value of the population proportion in the null hypothesis will be used to completely specify the mean and standard deviation of the test statistic.

What about for a small sample? If the sample size is small, you might wonder if there is a t-test for a single proportion. The short answer is that the t-test is not appropriate. Recall that a requirement to use the Student’s t-distribution is that the population from which the sample was taken must be normal or approximately normally distributed. When the parameter of interest is a proportion, the underlying population is actually binomial. How will we know if we can actually rely on the normal distribution? A good rule of thumb is to use a normal approximation as long as we can assume independence and verify np and nq are both greater than 10.

Z-Test for a Single Population Proportion

When performing a hypothesis test involving a single population proportion p the underlying sampling distribution of the \hat{p} is the normal distribution, as long as there is simple random sample of independent Bernoulli trials with np_o and n(1 - p_o) both greater than 10.

For hypothesis tests involving: H_o: p = p_o,   H_o: p \leq p_o,  or   H_o: p \geq p_o,

We assume H_o is true, so the null distribution is \hat{p} \sim N\bigg(p_o, \sqrt{\frac{p_o(1-p_o)}{n}}\bigg).

The test statistic (z-score) is \displaystyle{z = \frac{\hat{p} - p_o}{\sqrt{\frac{p_o(1-p_o)}{n}}}}.

Probability associated with the test statistic can be found from the standard normal distribution because z \sim N(0, 1). Equivalently, the p-value can be found using the null distribution directly.

If H_a: \mu \neq \mu_o, calculate the p-value as the sum of the areas in the tails cut off by -z and z.

If H_a: \mu > \mu_o, calculate the p-value as the area to the right of the test statistic, z.

If H_a: \mu < \mu_o, calculate the p-value as the area to the left of the test statistic, z.

Steps to Conducting a Hypothesis Test for a Single Proportion:

  1. After considering the research question, define the null and alternate hypothesis statements.
  2. Assume the null hypothesis is true and define the null distribution, stating how assumptions have been met.
  3. Under the assumptions that the null hypothesis is true, calculate the test statistic.
  4. Compute the p-value and create a drawing to support the calculation.
  5. Form a conclusion and write it in the context of the research question.

Example 1 – Smelling Parkinson’s Disease

A 72-year-old retired nurse from Scotland, with a condition giving her a hypersensitivity to smell, claimed she could smell Parkinson’s disease after noticing her husband started having a musky odor and was subsequently diagnosed with the disease. Neuroscientists were skeptical but decided to put her claims to the test. She was tasked with smelling 12 t-shirts, 6 of which were from people who had Parkinson’s disease, and 6 were from nonaffected people. She concluded 7 of the t-shirts indicated Parkinson’s disease. She correctly identified the disease in all six of the shirts from people with Parkinson’s disease. She categorized one of the t-shirts from the nonaffected people as actually having Parkinson’s disease, which initially seems like an error, however that person was diagnosed with Parkinson’s disease less than a year later.

  1. Create hypothesis test statements for this study.
  2. If you can carry out a hypothesis test, then do so, or explain why you cannot.

Solution:

  1. Whether or not she can correctly identify a t-shirt as being from an individual with the disease or from a nonaffected individual is what is being assessed with this test. If a person with no ability to smell the disease were to randomly guess, then they would have a 50% chance of being successful. This hypothesis test would be about the proportion of time, p, this person makes a correct identification. Her claim is that she has an ability to detect the disease, so the alternate hypothesis will be that the proportion of correct identifications is greater than 50%.
    H_o: p \leq 0.5
    H_a: p > 0.5
  2. Because this is a test involving proportions, the underlying assumption is that this is a random sample of independent trials. We would have to rely on the researchers to have conducted such an experiment. The issue is with the sample size. In this case n = 12 and p_o = 0.5, so np_o = n(1 - p_o) = (12)(0.5) = 6, neither of which is greater than 10. The sample size is too small to reliably rely on the normal distribution.

Note: You might wonder what should be done if a hypothesis test based on the normal distribution cannot be run. There are small sample nonparametric tests which do not rely on a particular population. This will not be covered in this text but they are not very robust. You can run a simulation. However, researchers used these initial results to dive into researching biomarkers based on a disease’s olfactory signature. You can read more in the Scientific America article from October 11, 2022.

Example 2 – E-Cigarette Use Among High School Students

The Centers for Disease Control and Prevention (CDC) found that in 2022, 14.1% of high school students reported recent (within the past 30 days) use of e-cigarettes. In 2023, a survey of 300 randomly selected high school students nationally found 30 used e-cigarettes. Is there evidence to suggest the proportion of high school students who use e-cigarettes has declined? Use a 5% significance level? Conduct a hypothesis test using the five steps.

Solution:

  1. The research question involves the proportion of high school students who use e-cigarettes, so this is a test of a proportion. The alternate hypothesis will state that the proportion of high school students who use e-cigarettes is less than 0.141. The opposite of this claim will be the null hypothesis, that is, the proportion of high school students who use e-cigarettes is greater than or equal to 0.141.
    H_o: p \geq 0.141
    H_a: p < 0.141
  2. The study involved a random sample of 300 high school students, with \hat{p} = \frac{30}{300} = 0.10. Due to the large random sample size, the fact that np_o = (300)(0.141) = 42.3, and n(1 - p_o) = (300)(0.859) = 257.7, we will be able to use the normal distribution, with \hat{p} \sim N\bigg(0.141, \sqrt{\frac{0.141(0.859)}{300}}\bigg) and the z-test statistic.
  3. The test statistic is \displaystyle{z = \frac{\hat{p} - p_o}{\sqrt{\frac{p_o(1 - p_0)}{n}}}} = \frac{0.10 - 0.141}{\sqrt{\frac{0.141(0.859)}{300}}} = -2.0405.
  4. The p-value is the probability of observing a sample proportion as extreme as we did under the assumption that the null hypothesis is true. With a statistical program it is simple to conduct a hypothesis test using the value of the z-test statistic or, equivalently, with the null sampling distribution directly. Both options are presented in Figure 1.
    Two normal distributions with the pvalue probabilities shaded as described in the text.
    Figure 1: P-value

    The p-value is the probability of observing a z-test statistic of z = -2.0405 or more extreme. Because this is a one-tailed (left-tailed) test, the p-value will be calculated by finding the probability as P(z \leq -2.0405) \approx 0.02065 or approximately 2.1%.
    Alternatively, and equivalently, the probability under the null hypothesis of observing a sample mean of \hat{p} = 0.10 hours or more extreme can be calculated directly as P(\hat{p} \leq 0.10) using the null distribution, giving the same p-value.

  5. Assuming the null hypothesis is true, the probability we would observe a sample mean as extreme as the one we observed is 0.021. There is a 2.1% chance of observing a sample as least as extreme as we did, which is less than the 5% level of significance. Because the p-value is smaller than the 5% level of significance, we conclude that we do have enough evidence to reject the null hypothesis. The data do support the claim that e-cigarette use among high school students has declined. The observed sample proportion is statistically significant.

Relationship Between Confidence Intervals and Hypothesis Testing

Confidence intervals and hypothesis tests are similar in that they are both methods of statistical inference and they both rely on an approximated sampling distribution. Confidence intervals use data from a sample to estimate the population parameter, while hypothesis testing sets a hypothesized parameter and use data from a sample to test the hypothesis. Two-tailed hypothesis tests in general go hand-in-hand with two-tailed confidence intervals. In this text, we did not discuss one-sided confidence intervals, although they exist.

Confidence intervals contain a range of reasonable estimates of the population parameter. A 100(1 – \alpha)% confidence interval contains those values for a parameter for which the p-value of a hypothesis will be greater than \alpha. This is true for tests involving the mean. However, for the proportion, the confidence interval method had to be adjusted, so this relationship between the confidence interval for a proportion and a hypothesis test for a proportion is only approximately true.

Sources

Kwon, D. (2024, May 2). A supersmeller can detect the scent of Parkinson’s, leading to an experimental test for the illness. Scientific American. https://www.scientificamerican.com/article/a-supersmeller-can-detect-the-scent-of-parkinsons-leading-to-an-experimental-test-for-the-illness/

CDC Newsroom. (2016, January 1). CDC. https://www.cdc.gov/media/releases/2022/p1007-e-cigarette-use.html

License

Icon for the Creative Commons Attribution 4.0 International License

Introduction to Statistics for Engineers Copyright © by Vikki Maurer & Jeff Crabill & Linn-Benton Community College is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Feedback/Errata

Comments are closed.