All courses › Mathematics S2 › A two-sided test

A two-sided test

A two-sided test is used when the alternative is that the proportion differs from the value in the null hypothesis, without the direction being given in advance. You calculate the same Z as in the one-sided test, and look at the absolute value. The course rule of thumb at the 5% level is to reject when the absolute value is greater than the table value 1.96. That boundary comes from the normal table, where Φ of 1.96 is 0.975. The Z-value itself can be calculated directly.

Z=X−np0np0(1−p0)Z = \frac{X - np_0}{\sqrt{np_0(1-p_0)}}the same statistic
∣Z∣>1.96|Z| > 1.96two-sided 5% rule, from the table

Symbols

p0p_0the proportion in the null hypothesis
XXobserved count

Example

H0:p=0.25H_0: p = 0.25, n=400n = 400 and X=120X = 120.

Z=120−100400⋅0.25⋅0.75≈2.31Z = \dfrac{120 - 100}{\sqrt{400 \cdot 0.25 \cdot 0.75}} \approx 2.31.

Two-sided: look at the absolute value of Z. One-sided: look at the sign as well.
Practise hypothesis testing for free →

← A test of a mean

Part of Mathematics S2: Hypothesis testing.