myLearning

Topic 6 of 7

Step 17 · Statistics and probability topics

Set up a test of a claim, compute a test statistic and its p-value, and draw a conclusion while keeping the two kinds of error in mind.

Null and alternative hypotheses

A test weighs evidence against a default claim. The null hypothesis H₀ says nothing unusual is going on, usually that a parameter equals a set value. The alternative Hₐ is what you suspect instead: greater, less, or simply different.

Example: Setting up

A cereal maker claims its boxes hold 500 g on average. A watchdog suspects they hold less. State the hypotheses.

  1. H₀: μ = 500.
  2. Hₐ: μ < 500, a one-sided test.

AnswerH₀: μ = 500 g and Hₐ: μ < 500 g

Example: Two-sided

Is a coin fair? State the hypotheses for p, the chance of heads.

  1. H₀: p = 0.5.
  2. Hₐ: p ≠ 0.5, since a bias either way counts.

AnswerH₀: p = 0.5 and Hₐ: p ≠ 0.5

Test statistics and p-values

The test statistic measures how far the sample result is from what H₀ predicts, in standard errors. The p-value is the probability, if H₀ were true, of a result at least as extreme as the one observed. A small p-value is evidence against H₀.

z=xˉ−μ0σ/nz=p^−p0p0(1−p0)/nz = \frac{\bar{x} - \mu_{0}}{\sigma/\sqrt{n}} \qquad z = \frac{\hat{p} - p_{0}}{\sqrt{p_{0}(1 - p_{0})/n}}

Example: Cereal boxes

A sample of 36 boxes has mean 495 g, and σ = 12 g. Find the test statistic and p-value for Hₐ: μ < 500.

  1. SE = 12 ÷ 6 = 2.
  2. z = (495 − 500) ÷ 2, which is −2.5.
  3. The area below z = −2.5 is about 0.006.

Answerz = −2.5 and p is about 0.006: strong evidence the boxes are underfilled

Example: A coin

A coin lands heads 60 times in 100 tosses. Test H₀: p = 0.5 against p ≠ 0.5.

  1. SE = √(0.5 × 0.5 ÷ 100), which is 0.05.
  2. z = (0.6 − 0.5) ÷ 0.05, which is 2.
  3. Two-sided, so double the tail: 2 × 0.023 = 0.046.

Answerp is about 0.046, just under 0.05: some evidence the coin is biased

Errors and conclusions

If p ≤ α, reject H₀: the data are unlikely under it. If p > α, fail to reject H₀: the evidence is not strong enough, which is not proof that H₀ is true.

DecisionH₀ trueH₀ false
Reject H₀Type I error, chance αCorrect
Fail to rejectCorrectType II error

Example: Which error?

A trial concludes that a useless medicine works. Which error is this?

  1. The truth is H₀: the medicine has no effect.
  2. The test rejected H₀ anyway.

AnswerA type I error

Example: Significance and size

A huge study finds a diet lowers weight by 0.1 kg on average, with p = 0.001. Is the effect important?

  1. The tiny p-value says the effect is probably real.
  2. But 0.1 kg is too small to matter to anyone.

AnswerStatistically significant, but not practically important

Try it yourself

Work each one on paper first, then open the answer to check.

  1. A school claims its mean test score is 75. You suspect it is higher. State Hₐ.

    Show answer

    μ > 75

  2. p = 0.03 and α = 0.05. What do you conclude?

    Show answer

    Reject H₀

  3. p = 0.20 and α = 0.05. What do you conclude?

    Show answer

    Fail to reject H₀: there is not enough evidence

  4. x̄ = 52, μ₀ = 50, σ = 10 and n = 100. What is z?

    Show answer

    2

  5. Failing to reject a false null hypothesis is which type of error?

    Show answer

    Type II

  6. If α = 0.01, what is the chance of a type I error when H₀ is true?

    Show answer

    0.01

What next?