7. Hypothesis Testing: Hypothesis Test for a Population Proportion
Large-sample Proportion Test: Test Statistic and p-value
Suppose we draw a simple random sample of size from a population of which some proportion exhibits a particular characteristic.
Let denote the number of successes out of observations, and let denote the sample proportion.
When the sample size is large (), the Central Limit Theorem can be invoked, and a -test can be used to test certain hypotheses about the population proportion .
Z-test for a Population Proportion: Test Statistic
The test statistic of a -test for a population proportion is calculated as follows:
Under the assumption that the null hypothesis is true, the sampling distribution of is the Standard Normal Distribution. That is, .
A lowercase will be used to denote the measured value of after the data has been collected.
Calculating the p-value of a Z-test for a Population Proportion with Statistical Software
The calculation of the -value of a -test for is dependent on the direction of the test and can be performed using either Excel or R.
To calculate the -value of a -test for in Excel, make use of one of the following commands:
To calculate the -value of a -test for in R, make use of one of the following commands:
If , reject and conclude . Otherwise, do not reject .
Note: denotes the absolute value of , i.e. the distance of from , regardless of whether or .
To test this claim, a journalist working at a newspaper surveys citizens, using random sampling. Let denote the number of citizens who are in favor of the new law.
The journalist plans on using a hypothesis test to determine if the proportion of citizens who are in favor of the new law significantly differs from , at the level of significance.
The survey results indicate that of the citizens in the sample are in favor of the new proposal.
Calculate the -value of the test and make a decision regarding . Round your answer to decimal places.
On the basis of this -value, should not be rejected, because .
There are a number of different ways we can calculate the -value of the test. Click on one of the panels to toggle a specific solution.
A sample size of is considered large enough for the Central Limit Theorem to apply. This means that the test statistic
approximately has the distribution under the assumption that is true.
Compute the sample proportion :
Calculate the value of test statistic :
For a two-tailed -test, the -value is defined as . To calculate this value in Excel, make use of the following function:
NORM.DIST(x, mean, standard_dev, cumulative)
- x: The value at which you wish to evaluate the distribution function.
- mean: The mean of the distribution.
- standard_dev: The standard deviation of the distribution.
- cumulative: A logical value that determines the form of the function.
- TRUE - uses the cumulative distribution function,
- FALSE - uses the probability density function
Thus, to calculate , run the following command:
This gives:
Since , should not be rejected.
A sample size of is considered large enough for the Central Limit Theorem to apply. This means that the test statistic
approximately has the distribution under the assumption that is true.
Compute the sample proportion :
Calculate the value of test statistic :
For a two-tailed -test, the -value is defined as . To calculate this value in R, make use of the following function:
pnorm(q, mean, sd, lower.tail)
- q: The value at which you wish to evaluate the distribution function.
- mean: The mean of the distribution.
- sd: The standard deviation of the distribution.
- lower.tail: If TRUE (default), probabilities are , otherwise, .
Thus, to calculate , run the following command:
This gives:
Since , should not be rejected.