Two Proportion Z-Test Calculator

A two proportion z-test is used to test for a difference between two population proportions. The test statistic is calculated as:
z = (p1-p2) / √(p(1-p)(1/n1+1/n2)
where:
  • p = total pooled proportion
  • p1 = sample 1 proportion
  • p2 = sample 2 proportion
  • n1 = sample 1 size
  • n2 = sample 2 size
To perform a two proportion z-test, simply fill in the information below and then click the “Calculate” button.

z-statistic: 0.31917

p-value (one-tailed): 0.37480

p-value (two-tailed): 0.74960

4 Replies to “Two Proportion Z-Test Calculator”

  1. Newborn babies are more likely to be boys than girls. A random sample found 13,173
    boys were born among 25,468 newborn children. The sample proportion of boys was
    0.5172. Is this sample evidence that the birth of boys is more common than the birth of
    girls in the entire population? Use  = 0.05.

    Hi, please tell me if we need the percentage of boys born in the population to solve the problem above.

    1. Hi Willem…To determine whether the birth of boys is more common than the birth of girls in the entire population based on the given sample, we can conduct a hypothesis test.

      Let’s set up the hypotheses:

      – Null Hypothesis (H0): The proportion of boys born in the entire population is equal to 0.5 (no difference in the likelihood of boys and girls).
      – Alternative Hypothesis (H1): The proportion of boys born in the entire population is greater than 0.5 (boys are more likely to be born than girls).

      Given that the sample proportion of boys is 0.5172, we’ll conduct a one-sample z-test to compare this sample proportion with the population proportion.

      To calculate the z-statistic, we’ll use the formula:

      \[ z = \frac{{\hat{p} – p}}{{\sqrt{\frac{{p(1-p)}}{n}}}} \]

      Where:
      – \(\hat{p}\) is the sample proportion of boys,
      – \(p\) is the hypothesized population proportion (0.5 in this case),
      – \(n\) is the sample size.

      Given:
      – \(\hat{p} = 0.5172\)
      – \(p = 0.5\)
      – \(n = 25468\)

      We can calculate the z-statistic. However, we don’t need the percentage of boys born in the population to perform this calculation. We only need the hypothesized population proportion.

      Let’s calculate the z-statistic.

      We can calculate the z-statistic using the provided formula:

      \[ z = \frac{{0.5172 – 0.5}}{{\sqrt{\frac{{0.5(1-0.5)}}{25468}}}} \]

      \[ z = \frac{{0.0172}}{{\sqrt{\frac{{0.5(0.5)}}{25468}}}} \]

      \[ z ≈ \frac{{0.0172}}{{\sqrt{\frac{{0.25}}{{25468}}}}} \]

      \[ z ≈ \frac{{0.0172}}{{\sqrt{0.000009786}}} \]

      \[ z ≈ \frac{{0.0172}}{{0.0031273}} \]

      \[ z ≈ 5.502 \]

      Now, we can compare this z-statistic with the critical z-value corresponding to the significance level of \( \alpha = 0.05 \) for a one-tailed test.

      Since the alternative hypothesis is that boys are more likely to be born than girls, it’s a one-tailed test, and we’re interested in the right tail.

      For \( \alpha = 0.05 \), the critical z-value is approximately 1.645.

      Since the calculated z-statistic (5.502) is greater than the critical z-value (1.645), we reject the null hypothesis.

      Therefore, based on the given sample, there is sufficient evidence to conclude that the birth of boys is more common than the birth of girls in the entire population.

  2. Unless it is physically impossible for the results to go in the direction opposite that of the researcher’s hypothesis, one-tailed tests are inherently anti-science because they dismiss out-of-hand any significant effects that arise in the direction opposite that of the researcher’s hypothesis.

Leave a Reply

Your email address will not be published. Required fields are marked *