Wiki Page, Math 13 - Perez Sandbox : Module 21 - Hypothesis Test for a Population Proportion (2b of 3)

Wiki Page
2026-01-17T21:15:33-08:00

Two-tailed hypothesis tests

A hypothesis test can be one-tailed or two-tailed. The previous example was a one-tailed hypothesis test. The P-value was the area of the right tail. If the inequality in the alternative hypothesis is or , the test is one-tailed (left-tailed if the inequality is , and right-tailed if the inequality is ). If the inequality is , the test is two-tailed and the P-value is twice the area in either tail.

EXAMPLE Internet access

Recall the following example from the previous page. According to the Kaiser Family Foundation, 84% of U.S. children ages 8 to 18 had Internet access at home as of August 2009. Researchers wonder if this percentage has changed since then. They survey 500 randomly selected children (ages 8 to 18) and find that 430 of them have Internet access at home.

Use a level of significance of α = 0.05 for this hypothesis test.

Step 1: Determine the hypotheses.

:

:

where p is the proportion of children ages 8 to 18 with Internet access at home now.

Note that the alternative hypothesis is a statement. Why? Because "researchers wonder if this percentage has changed since then." The researchers don't have an opinion about whether the change was an increase or a decrease.

Note that the sample data is collected after the hypotheses are stated. Therefore, the fact that the observed sample proportion is greater than 0.84 (430 out of 500 = 0.86) does not influence the alternative hypothesis.

Step 2: Collect the data.

Our sample is random, so there is no problem there. Again, we want to determine whether the normal model is a good fit for the sampling distribution of sample proportions. Based on the null hypothesis, we will use 0.84 as our population proportion to check the conditions.

and

Because these are both more than 10, we can use the normal model to find the P-value.

Step 3: Assess the evidence.

Since we can use the normal model, we need to calculate the z-test statistic for the sample proportion. We first calculate the sample proportion.

Next, we calculate our Z-score, the test statistic:

= =

The sample proportion of 0.86 is about 1.22 standard errors above the population proportion given in the null hypothesis. Now we calculate the P-value. This is where the two-tailed nature of the test is important. The P-value is the probability of seeing a sample proportion at least as extreme as the one observed from the data if the null hypothesis is true.

In the previous example, only sample proportions higher than the null proportion were evidence in favor of the alternative hypothesis. In this example, any sample proportion that differs from 0.84 is evidence in favor of the alternative. Statistically significant differences are at least as extreme as the difference we see in the data.

We want to determine the probability that the difference in either direction (above or below 0.84) is at least as large as the difference seen in the data, so we include sample proportions with an error of 0.02 in either direction. These are sample proportions at or above 0.86 and sample proportions at or below 0.82 (0.84 – 0.02 = 0.82). For this reason, we look at the area in both tails. Our applet shows one tail, so we have to double this area.

Normal Distribution Calculator

Here are our results:

The area above the test statistic of 1.22 is about 0.11. For a two tailed test we double this area to include the area in the left tail, below Z = −1.22. This gives us a P-value of approximately 0.22 (2 x 0.11 = 0.22.)

Our sample proportion was 0.02 above the population proportion from the null hypothesis. In a sample of size 500, we would observe a sample proportion 0.02 or more away from 0.84 about 22% of the time by chance alone.

Step 4: State a conclusion.

Again we compare the P-value to the level of significance, . In this case, the P-value of 0.22 is greater than 0.05, which means we do not have enough evidence to reject the null hypothesis. A sample result that could occur 22% of the time by chance alone is not statistically significant. Now we can state the conclusion in terms of the alternative hypothesis.

The data from this study does not provide evidence that is strong enough to conclude that the proportion of all children ages 8 to 18 who have Internet access at home has changed since 2009 (P-value = 0.22). The 2% change observed in the data is not statistically significant. These results can be explained by predictable variation in random samples.

A Note about the Conclusion

In the conclusion above, we did not have enough evidence to reject the null hypothesis. As we noted previously, failing to reject the null hypothesis does not mean the null hypothesis is true.

In the case of the previous example, it is possible that the proportion of children who have Internet access at home has changed. But the data we gathered did not provide the evidence to detect that the proportion had changed significantly.

Researchers often note improvements that could be made in their research and suggest follow-up research that might be done. In our example, a second sample with a larger sample size might provide the evidence needed to reject the null hypothesis.

The important thing to keep in mind is that at the end of a hypothesis test, we never say that the null hypothesis is true.

Mark this page as done, then click the "Next" or > button to continue.

Content by the Open Learning Initiative and licensed under CC BY.