Porisma
Back to reading

Hypothesis tests for a mean · Set up the test

Plan a test for a population mean

Fix the claim, check the model, then calculate and conclude. Read each step with its conditions.

  1. Define the mean and fix the test

    Name the population and the units of its mean. Choose the alternative and significance level before inspecting the sample result.

    State H0:μ=μ0H_0:\mu=\mu_0 and the chosen α\alpha, with 0<α<10<\alpha<1.

    Population quantityDefine μ, not the observed mean

    μ\mu is the fixed population mean. Xˉ\bar X varies between samples; xˉ\bar x is the observed sample value. Set μ0\mu_0 from the null claim, not from the observed data.

    Before the observationCommit to the direction and level

    A suspected decrease uses μ < μ₀; an increase uses μ > μ₀; a change either way uses μ ≠ μ₀. Set 5% as α = 0.05. Do not switch directions after seeing the sign of the statistic.

    The alternative determines what counts as evidence. A surprising result in the opposite direction does not turn a pre-specified one-sided test into a two-sided test.

  2. Justify a reference model before using z

    Check independent random sampling, the population model, and whether the population variance is known. A standardisation formula alone does not establish a standard-normal null distribution.

    For known σ\sigma, Z=Xˉ−μ0σ/nZ=\dfrac{\bar X-\mu_0}{\sigma/\sqrt n}.

    ExactNormal population and known variance

    Independent observations from a normal population with known variance give an exact normal sample mean at any sample size. The standardised statistic is exactly standard normal under H₀.

    ApproximateState the large-sample justification

    For an adequate independent random sample with finite variance, a justified CLT can support an approximate normal test. If the population variance is unknown, use its unbiased estimate and state that replacing σ\sigma by ss is an approximation here. A classroom sample-size threshold is not a universal accuracy guarantee.

    Not justifiedStop and reconsider the model

    A small sample from an unspecified population does not automatically justify a normal test. For a normal population with unknown variance, the usual small-sample statistic has a t distribution, not an exact standard-normal distribution. Do not continue with these z-tail rules without a justified normal approximation.

    Check the model before calculating a p-value. Biased selection or dependent observations require their own justification; increasing sample size alone does not remove selection bias.

  3. Count the tail or tails named by the alternative

    For a population-mean test, start from H₀: μ = μ₀. Use the pre-specified alternative, even if the observed statistic points the other way.

    Let Φ\Phi be the standard normal CDF and zz the observed statistic.

    Decrease · H₁: μ < μ₀Use the left tail

    p=Φ(z)p=\Phi(z). An observation far in the negative direction gives a small p-value; a positive observation does not justify switching to a right-sided test.

    Increase · H₁: μ > μ₀Use the right tail

    p=1−Φ(z)p=1-\Phi(z). Count values at least as large as the observation under the null model.

    Either direction · H₁: μ ≠ μ₀Include both equally extreme tails

    p=2[1−Φ(∣z∣)]p=2[1-\Phi(|z|)] for this symmetric standard-normal model. Use the magnitude of zz; do not double a probability greater than one half.

    Check the reference model before using these formulas. Normal-population mean tests with known variance are exact; large-sample normal tests require the stated sampling and approximation assumptions.

  4. Compare unrounded probabilities with the fixed level

    Write the significance level as a probability: 5% means α = 0.05. Compare the unrounded p-value using the declared rejection rule.

    Reject H0H_0 when p≤αp\le\alpha.

    p ≤ αReject the null hypothesis

    There is sufficient evidence, at the stated level and under the model assumptions, in favour of the pre-specified alternative. State the conclusion about the population mean in context.

    p > αDo not reject the null hypothesis

    There is insufficient evidence against the null at this level. This does not prove or accept the null hypothesis, nor assign it a probability of being true.

    A p-value is conditional on the null model, not a probability that the hypothesis is true. Preserve full precision near the boundary; do not repeat sampling to obtain a preferred decision.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

Follow the mean-mass example

The source scenario assumes normal masses with known variance 80 kg280\,\mathrm{kg}^2. An independent random sample of 100 men has mean 77.2 kg. Test the claim that the population mean exceeds 75 kg at 5%.

Show reasoning
  1. 1. Fix the population claim

    Let μ be the population mean mass in kg. The alternative comes from ‘exceeds’, before inspecting the sample. The level is a probability, not the number 5.

    H0:μ=75,H1:μ>75,α=0.05H_0:\mu=75,\quad H_1:\mu>75,\quad\alpha=0.05
  2. 2. Justify the null model

    The population is normal and its variance is known, so the independent sample mean is exactly normal. No CLT approximation is needed. Use the standard error, not the variance, in the denominator.

    Xˉ∼N ⁣(75,80100)under H0\bar X\sim N\!\left(75,\frac{80}{100}\right)\quad\text{under }H_0
  3. 3. Keep precision through the upper-tail calculation

    Use the unrounded statistic in the normal probability calculation. The probability counts results at least as large under the null model; it is not a probability that the null is true.

    z=77.2−7580/100=2.459674775…p=P(Z≥z)≈0.006953148\begin{aligned}z&=\frac{77.2-75}{\sqrt{80/100}}\\&=2.459674775\ldots\\p&=P(Z\ge z)\\&\approx0.006953148\end{aligned}
  4. 4. Conclude about the population

    Since p < 0.05, reject H₀. At the 5% level, there is sufficient evidence that the population mean mass exceeds 75 kg, under the stated model. This does not measure the practical size of an effect or prove a causal claim.

Continue with the lesson question

Same z, different pre-specified alternatives

Illustration: separately pre-specified right-sided and two-sided standard-normal tests each observe z=2z=2. Compare their p-values at 5%.

Show reasoning
  1. 1. Use the upper tail for the right-sided test

    Count values at least as large as the observed statistic under the null model.

    p=P(Z≥2)≈0.0228\begin{aligned}p&=P(Z\ge2)\\&\approx0.0228\end{aligned}
  2. 2. Include both extreme tails for the two-sided test

    The standard normal distribution is symmetric. Count values at least as far from zero as the observation, in either direction.

    p=P(∣Z∣≥2)≈0.0455\begin{aligned}p&=P(|Z|\ge2)\\&\approx0.0455\end{aligned}
  3. 3. Apply the declared level

    Use full calculator precision for the comparison; the displayed values are rounded. Both p-values are below 0.05, so both tests reject at 5%. Their different p-values reflect their different alternatives. Do not choose or switch the alternative after seeing the observed sign.

What does p = 0.032 mean?

Illustration from the unit: a right-sided test gives p = 0.032. Interpret this probability and compare decisions under pre-specified 5% and 1% rules.

Show reasoning
  1. 1. Condition on the null model

    If the null model were true, results at least this extreme in the stated direction would have probability 0.032. This is not a 3.2% probability that the null hypothesis is true.

  2. 2. Compare with each fixed rule

    Reject at 5%, but do not reject at 1%. The data and p-value stay the same; the smaller significance level requires stronger evidence.

    0.01<0.032<0.050.01<0.032<0.05
  3. 3. Keep the conclusion limited

    Non-rejection does not establish the null hypothesis. Statistical significance also does not measure the size or practical importance of an effect.