# Z-test for Two Proportions

Instructions: This calculator conducts a Z-test for two population proportions (p1 and p2), 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:

Ho: $$p_1$$ $$p_2$$
Ha: $$p_1$$ $$p_2$$
Sample Size ($$n_1$$) =
Sample Size ($$n_2$$) =
Favorable cases ($$X_1$$) =
Favorable cases ($$X_2$$) =
Significance Level ($$\alpha$$) =

#### 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 p1 and p2. Specifically, we are interested in assessing whether or not it is reasonable to claim that p1 = p2, 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).