Skip to content
Lesson 8 of 10 · Introductory Statistics

Hypothesis tests

Run a test of significance step by step: hypotheses, test statistic, p-value, decision, and the two kinds of error.

24 min

A hypothesis test asks: could the pattern in my sample plausibly be chance alone?

  1. 1.State the hypotheses. The null H₀ is the 'nothing special' claim (p = 0.5, μ = 50). The alternative Hₐ is what you suspect (p ≠ 0.5, or μ > 50). Decide before looking at the data whether Hₐ is one-sided or two-sided.
  2. 2.Check conditions (random sample, large enough n, or normal data for small n).
  3. 3.Compute the test statistic: (estimate − null value)/standard error. For a proportion, z = (p̂ − p₀)/√[p₀(1 − p₀)/n]. For a mean, t = (x̄ − μ₀)/(s/√n) with n − 1 df.
  4. 4.Find the p-value: the probability, assuming H₀ is true, of a result at least this extreme. Two-sided tests count both tails.
  5. 5.Decide. If p ≤ α (usually 0.05), reject H₀: the data are unlikely under H₀. Otherwise you fail to reject H₀, which is not the same as proving it.
  6. 6.State the conclusion in context.

  • It is P(data this extreme | H₀ true).
  • It is not the probability that H₀ is true, nor the probability the result is 'due to chance'.
  • A small p does not mean the effect is large or important. With a huge sample even a trivial difference gets a tiny p.

H₀ trueH₀ false
Reject H₀Type I error (probability α)correct (power)
Fail to rejectcorrectType II error

Lowering α reduces false alarms but makes real effects harder to detect. A larger sample improves power.

A coin lands heads 60 times in 100 tosses. Test at the 5% level whether it is fair.

  1. 1

    H₀: p = 0.5; Hₐ: p ≠ 0.5

    Two-sided, since any bias would interest us.

1/5

A delivery service claims a mean time of 50 minutes. A sample of 25 deliveries has x̄ = 52.4, s = 6. Test H₀: μ = 50 against Hₐ: μ ≠ 50 at 5%.

  1. 1

    SE = 6/√25 = 1.2

    Standard error.

1/4
Decide

A drug company runs a trial. The p-value for 'the drug lowers blood pressure' is 0.03, and α = 0.05. The sample is large, and the average drop is 0.4 mmHg.

What is the correct statistical decision?

  • State H₀ and Hₐ before looking at the data.
  • Test statistic = (estimate − null value)/standard error.
  • The p-value is P(data this extreme | H₀), not P(H₀ is true).
  • Reject H₀ if p ≤ α; otherwise fail to reject, which is not proof of H₀.
  • Type I error: rejecting a true H₀ (probability α). Type II: missing a real effect.
Check yourself

Practice.

1Numeric answer

p̂ = 0.56, n = 100, H₀: p = 0.5. Find the z statistic.

2Multiple choice

A test gives p = 0.03 with α = 0.05. You should:

  • Afail to reject H₀
  • Breject H₀
  • Caccept H₀
  • Dchange α
3Multiple choice

The p-value is the probability that:

  • AH₀ is true
  • BH₀ is false
  • Cdata this extreme would occur if H₀ were true
  • Dthe result is due to luck alone
4Multiple choice

A Type I error means:

  • Afailing to reject a false H₀
  • Brejecting a true H₀
  • Ccomputing the wrong statistic
  • Dusing too small a sample
5Put in order

Put the steps of a test in order.

  • AFind the p-value
  • BState H₀ and Hₐ
  • CCompute the test statistic
  • DCheck the conditions
  • EDecide and state the conclusion in context

Practise this lesson, not just read it

In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of Introductory Statistics is planned around your week. Free.