Test for one proportion

Section of Hypothesis tests, part of Statistical inference

Test for one proportion

Type Section
Taught in Hypothesis tests
Part Statistical inference

Ten people taste two yoghurts, one with an old sweetener and one with a new. Eight prefer the new one. Model the number preferring the new yoghurt as X\sim\operatorname{Bin}(10,p), and test H_0:p=0.5 against H_1:p>0.5.

Definition 1 (Binomial test) For X\sim\operatorname{Bin}(n,p) and H_0:p=p_0, the test statistic is X, with null distribution \operatorname{Bin}(n,p_0). At level \alpha, against p>p_0 reject when X\ge c, with c the smallest integer such that \mathbb{P}_{H_0}(X\ge c)\le\alpha. Against p<p_0 reject when X\le c, with c the largest integer such that \mathbb{P}_{H_0}(X\le c)\le\alpha. Against p\neq p_0, use both tails at \alpha/2 each.

Article: Binomial test →

Under H_0, \mathbb{P}(X\ge8)=0.055 and \mathbb{P}(X\ge9)=0.011. At level 0.05 the critical region is \{9,10\}, and x=8 is not in it, so H_0 is not rejected. The p-value is 0.055, which leaves real doubt about H_0. That a p-value of 0.055 and one of 0.045 lead to opposite decisions is a good reason to report the p-value rather than only the decision.

For large n,

Z=\frac{X-np_0}{\sqrt{np_0(1-p_0)}}

is approximately standard normal under H_0, and the normal critical values apply. The null standard error uses p_0, not \widehat p: the test asks how variable X would be if H_0 were true.

Used in

See also

Null and alternative hypotheses · Critical region · p-value · Type I and type II errors · Neyman–Pearson approach · Power function · One-sample t test · Two-sample t test

Glossary and index