7. Hypothesis Testing: Hypothesis Test for a Population Proportion
Hypothesis Test for a Proportion and Confidence Intervals
Recall that there exists a direct connection between a two-sided hypothesis test for and a confidence interval for .
This same connection does not apply precisely when we are testing hypotheses about a population proportion :
- When performing the hypothesis test, we use to compute the test statistic.
- When constructing a confidence interval, we use to compute the margin of error.
However, if you compute the confidence interval for using instead of to calculate the margin of error, the connection is reestablished.
Connecting Hypothesis Testing and Confidence Intervals
If you compute a for using
Then:
- If falls inside the , then should not be rejected at the level of significance.
- If falls outside of the , then should be rejected at the level of significance.
In a random sample of residents of the land of Oz, of them were in favor of deposing the Wizard.
Construct a confidence interval for the proportion of the population of Oz that favors deposing the Wizard, using in the computation of the margin of error. Round your answers to decimal places.
Based on this confidence interval, the null hypothesis should not be rejected at the level of significance because falls inside the confidence interval.
There are a number of different ways we can compute the confidence interval. Click on one of the panels to toggle a specific solution.
Calculate the sample proportion :
When using to calculate the margin of error, the general formula for a for the population proportion is:
For a given confidence level (in ), the critical value of the standard normal distribution is the value such that .
To calculate this critical value in Excel, make use of the following function:
NORM.INV(probability, mean, standard_dev)
- probability: A probability corresponding to the normal distribution.
- mean: The mean of the distribution.
- standard_dev: The standard deviation of the distribution.
Here, we have . Thus, to calculate such that , run the following command:
This gives:
When using to calculate the margin of error, we calculate the lower bound of the confidence interval:
When using to calculate the margin of error, we calculate the lower bound of the confidence interval:
Thus, the confidence interval for the population proportion is:
Based on this confidence interval, the null hypothesis should not be rejected at the level of significance because falls inside the confidence interval.
Calculate the sample proportion :
When using to calculate the margin of error, the general formula for a for the population proportion is:
For a given confidence level (in ), the critical value of the standard normal distribution is the value such that .
To calculate this critical value in R, make use of the following function:
qnorm(p, mean, sd, lower.tail)
- p: A probability corresponding to the normal distribution.
- mean: The mean of the distribution.
- sd: The standard deviation of the distribution.
- lower.tail: If TRUE (default), probabilities are , otherwise, .
Here, we have . Thus, to calculate such that , run the following command:
This gives:
When using to calculate the margin of error, we calculate the lower bound of the confidence interval:
When using to calculate the margin of error, we calculate the lower bound of the confidence interval:
Thus, the confidence interval for the population proportion is:
Based on this confidence interval, the null hypothesis should not be rejected at the level of significance because falls inside the confidence interval.