Z-test for Two Proportions
Instructions: This calculator conducts a Z-test for two population proportions (\(p_1\) and \(p_2\)), Please select the null and alternative hypotheses, type the significance level, the sample sizes, the number of favorable cases (or the sample proportions) and the results of the z-test will be displayed for you:
When Do You Use a Z-test for Two Proportions?
More about the z-test for two proportions so you can better understand the results yielded by this solver: A z-test for two proportions is a hypothesis test that attempts to make a claim about the population proportions p 1 and p 2 . Specifically, we are interested in assessing whether or not it is reasonable to claim that p 1 = p 2 , using sample information. The Z-test for two proportions has two non-overlapping hypotheses, the null and the alternative hypothesis.
What are the null and alternative hypotheses for the z-test for two proportions?
The null hypothesis is a statement about the population parameter which indicates no effect, and the alternative hypothesis is the complementary hypothesis to the null hypothesis. The main properties of a one sample z-test for two population proportions are:
- Depending on our knowledge about the "no effect" situation, the z-test can be two-tailed, left-tailed or right-tailed
- The main principle of hypothesis testing is that the null hypothesis is rejected if the test statistic obtained is sufficiently unlikely under the assumption that the null hypothesis is true
- The p-value is the probability of obtaining sample results as extreme or more extreme than the sample results obtained, under the assumption that the null hypothesis is true
- In a hypothesis tests there are two types of errors. Type I error occurs when we reject a true null hypothesis, and the Type II error occurs when we fail to reject a false null hypothesis
What is the z-test formula in this case?
The formula for a z-statistic for two population proportions is
\[z = \frac{\hat p_1 - \hat p_2}{\sqrt{\bar p(1-\bar p)(\frac{1}{n_1} + \frac{1}{n_2})}}\]where \(\bar p = \frac{X_1+X_2}{n_1+n_2}\) corresponds to the pooled proportion (Notice that in the above z test for proportions formula, we get in the denominator something like our "best guess" of what the population proportion is from information from the two samples, assuming that the null hypothesis of equality of proportions is true). The null hypothesis is rejected when the z-statistic lies on the rejection region, which is determined by the significance level (\(\alpha\)) and the type of tail (two-tailed, left-tailed or right-tailed).
The Case for one population proportion
In case you only have one sample proportion (so you are testing for one population proportion), you should use our z-test for one proportion calculator , which specifically addresses that case.