Hypothesis Test for a Proportion
A hypothesis test for a proportion involves testing a claim about a population proportion (P) using sample data. Here's a step-by-step guide to performing a one-sample z-test for a proportion, which is the most common method for this type of test.
When to Use This Analysis
The approach described in this lesson is appropriate when the following conditions are met:
- The sampling method is simple random sampling.
- Each sample point can result in just two possible outcomes. (We call one of these outcomes a success and the other, a failure. The proportion of successes in the sample is denoted by p.)
- The sample includes at least 10 successes and 10 failures. (This condition is required to support an assumption that the sampling distribution of the proportion will be approximately normal in shape, which is necessary to justify the use of a one-sample z-test.)
- The population size is at least 20 times as big as the sample size. (This condition is required to justify using an approximate formula to compute the standard error of the sampling distribution.)
Before proceeding with a hypothesis test, ensure that these conditions are met.
General Procedure for Hypothesis Testing
To test any hypothesis, the same five-step procedure is used: (1) state the hypotheses, (2) choose the significance level, (3) compute the test statistic, (4) find the P-value, and (5) interpret results. Here, we apply the general procedure to hypothesis tests of proportions.
State the Hypotheses
Every hypothesis test requires the analyst to state a null hypothesis and an alternative hypothesis . The hypotheses are stated in such a way that they are mutually exclusive. That is, if one is true, the other must be false, as shown below.
-
Null hypothesis (H0): The population proportion equals P1.
H0: P = P0
-
Alternative hypothesis (Ha): The proportions differ in one of three possible ways.
Ha: P ≠ P0 (Two-tailed test checking for any difference from P1)
Ha: P > P0 (One-tailed test checking if P is greater than P1)
Ha: P < P0 (One-tailed test checking if P is less than P1)
where P is the true population proportion and P0 is the hypothesized population proportion.
Choose the Significance Level
Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.
Compute the Test Statistic
Use the one-sample z-test to determine whether the hypothesized population proportion differs significantly from the observed sample proportion. The test statistic is a z-score (z) defined by the following equation.
z = (p - P0) / SD;
where P0 is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and SD is the standard deviation of the sampling distribution.
When the population size is at least 20 times bigger than the sample size, the standard deviation of the sampling distribution (SD) can be computed from this formula:
SD = sqrt[ P0 * ( 1 - P0 ) / n ]
where P0 is the hypothesized value of population proportion in the null hypothesis, and n is the sample size.
Find the P-Value
The P-value is the probability of observing a sample statistic as extreme as the z-score test statistic. To assess the probability associated with the z-score, use an online calculator, a graphing calculator, or a normal distribution statistical table. (See sample problems at the end of this lesson for examples of how this is done with Stat Trek's Normal Distribution Calculator.)
Interpret Results
If the sample findings are unlikely, given the null hypothesis, the researcher rejects the null hypothesis. This involves comparing the P-value to the significance level, and rejecting the null hypothesis when the P-value is less than the significance level.
Test Your Understanding
In this section, two hypothesis testing examples illustrate how to conduct a hypothesis test of a proportion. The first problem involves a a two-tailed test; the second problem, one-tailed test.
Sample Size Calculator
As you probably noticed, the process of testing a hypothesis about a proportion can be complex. Stat Trek's Sample Size Calculator can do the same job quickly and easily. When you need to test a hypothesis, consider using the Sample Size Calculator. The calculator is free. It can found in the Stat Trek main menu under the Stat Tools tab. Or you can tap the button below.
Sample Size CalculatorProblem 1: Two-Tailed Test
The CEO of a large electric utility claims that 80 percent of his 1,000,000 customers are very satisfied with the service they receive. To test this claim, the local newspaper surveyed 100 customers, using simple random sampling. Among the sampled customers, 73 percent say they are very satisified. Based on these findings, can we reject the CEO's hypothesis that 80% of the customers are very satisfied? Use a 0.05 level of significance.
Solution: The solution to this problem takes five steps: (1) state the hypotheses, (2) choose the significance level, (3) compute the test statistic, (4) find the P-value, and (5) interpret results. We work through those steps below:
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
Null hypothesis: P = 0.80
Alternative hypothesis: P ≠ 0.80
Note that these hypotheses constitute a two-tailed test. The null hypothesis will be rejected if the sample proportion is too big or if it is too small.- Choose the significance level. For this analysis, the significance level is 0.05.
-
Compute the test statistic. The
one-sample z-test is
an appropriate method to determine whether a hypothesized population proportion differs
significantly from an observed sample proportion. The test statistic for a one-sample z-test is a z-score.
Using sample data, we
calculate the standard deviation (SD) and compute the z-score
test statistic (z).
SD = sqrt[ P0 * ( 1 - P0 ) / n ]
SD = sqrt [(0.8 * 0.2) / 100]
SD = sqrt(0.0016) = 0.04
z = (p - P0) / SD = (.73 - .80)/0.04 = -1.75
where P0 is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and n is the sample size.
- Find the P-value. Since we have a two-tailed test, the P-value is the probability of observing a z-score more extreme than the absolute value of the test statistic (i.e., less than -1.75 or greater than 1.75). We use the Normal Distribution Calculator to find P(z < -1.75) = 0.04. Since the standard normal distribution is symmetric with a mean of zero, we know that P(z > 1.75) = 0.04. Thus, the P-value = 0.04 + 0.04 = 0.08.

- Interpret results. Since the P-value (0.08) is greater than the significance level (0.05), we cannot reject the null hypothesis.
Note: If you use this approach on an exam, you may also want to mention why this approach is appropriate. Specifically, the approach is appropriate because the sampling method was simple random sampling, the sample included at least 10 successes and 10 failures, and the population size was at least 10 times the sample size.
Problem 2: One-Tailed Test
Suppose the previous example is stated a little bit differently. Suppose
the CEO claims that at least 80 percent of the company's
1,000,000 customers are very satisfied. Again, 100 customers are
surveyed using simple random sampling. The result: 73
percent are very satisfied. Based on these results, should we
accept or reject the CEO's hypothesis? Assume a significance
level of 0.05.
Solution: The solution to this problem takes five steps: (1) state the hypotheses, (2) choose the significance level, (3) compute the test statistic, (4) find the P-value, and (5) interpret results. We work through those steps below:
- State the hypotheses. The first step is to
state the null hypothesis and an alternative hypothesis.
Null hypothesis: P = 0.80
Alternative hypothesis: P < 0.80
Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected only if the sample proportion is too small. - Choose the significance level. For this analysis, the significance level is 0.05.
-
Compute the test statistic. The
one-sample z-test is
an appropriate method to determine whether a hypothesized population proportion differs
significantly from an observed sample proportion. The test statistic for a one-sample z-test is a z-score. Using sample data, we
calculate the standard deviation (SD) and compute the z-score
test statistic (z).
SD = sqrt[ P * ( 1 - P0 ) / n ] = sqrt [(0.8 * 0.2) / 100]
SD = sqrt(0.0016) = 0.04
z = (p - P0) / SD = (.73 - .80)/0.04 = -1.75
where P0 is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and n is the sample size.
- Find the P-value. Since we have a one-tailed test , the P-value is the probability that the z-score is less than -1.75. In the previous problem, we used the Normal Distribution Calculator to find P(z ≤ -1.75) = 0.04. Thus, the P-value = 0.04.
- Interpret results. Since the P-value (0.04) is less than the significance level (0.05), we cannot accept the null hypothesis.