Leave lesson

Statistics · Hypothesis testing

1 / 12

Setting up a hypothesis test

The language and structure of a binomial hypothesis test: the population proportion p, the null hypothesis H0 : p = p0 and the alternative hypothesis H1, deciding between a one-tailed (p < p0 or p > p0) and a two-tailed (p ≠ p0) test from the wording, the test statistic X ~ B(n, p0) under H0, and what the significance level means.

Statistics · Hypothesis testing

Setting up a hypothesis test

The language and structure of a binomial hypothesis test: the population proportion p, the null hypothesis H0 : p = p0 and the alternative hypothesis H1, deciding between a one-tailed (p < p0 or p > p0) and a two-tailed (p ≠ p0) test from the wording, the test statistic X ~ B(n, p0) under H0, and what the significance level means.

Why it works

A hypothesis test uses the result of one sample to decide between two competing claims about a population parameter — here a population proportion pp (the probability of "success": a defective item, a red bead, a late customer). We can't see the whole population, so we reason from how surprising the sample would be if a particular value of pp were true.

The two hypotheses.
  • The null hypothesis H0H_0 is the "no change / status quo" claim, and is always an
equality: H0:p=p0H_0 : p = p_0, where p0p_0 is the value being assumed (often a previously known or claimed proportion).
  • The alternative hypothesis H1H_1 is what you are testing for. It takes one of
three forms, chosen from the wording:
  • H1:p>p0H_1 : p > p_0 — an upper one-tailed test ("increased", "more than", "better");
  • H1:p<p0H_1 : p < p_0 — a lower one-tailed test ("decreased", "fewer", "worse");
  • H1:pp0H_1 : p \ne p_0 — a two-tailed test ("changed", "different", "not equal to").
The single most useful reading skill is spotting whether a problem claims a direction (one-tailed) or merely a change (two-tailed).

The test statistic. We assume H0H_0 is true and model the number of successes in the sample as

XB(n,p0),X \sim B(n, p_0),

where nn is the sample size. We then ask: under this model, how likely is a result as extreme as the one observed? If that probability is small enough, H0H_0 looks implausible.

The significance level. The significance level α\alpha (commonly 5%5\% or 1%1\%) is the cut-off for "small enough". Crucially, α\alpha is the probability of rejecting H0H_0 when it is actually true — the risk of a wrong rejection you are willing to accept. A smaller α\alpha demands stronger evidence before rejecting H0H_0.

The decision. Compute the probability, in the relevant tail, of a result at least as extreme as the observed one (assuming H0H_0). If it is less than α\alpha (for a two-tailed test, less than α2\tfrac{\alpha}{2} in that tail), the result lands in the unlikely region, so you reject H0H_0; otherwise there is insufficient evidence and you do not reject H0H_0. Every conclusion must be stated in context.