# 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:

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-overlaping hypotheses, the null and the alternative hypothesis.

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 proprtions 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

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* (which is 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).

In case you have any suggestion, please do not hesitate to contact us.