Hypothesis Testing
Context: FIT2086_MOC · the third inference task, after the point estimation of Maximum Likelihood Estimation and the interval estimation of Confidence Intervals · same sampling-distribution machinery, run backwards: fix at the null and ask how improbable the observed was · the concrete tests live in Tests for Normal Means (z-test and t-test) and Tests for Bernoulli Populations
Quick Revision
- 🎯 Objective: assume true ➔ derive the sampling distribution of a test statistic ➔ report the tail probability of a discrepancy as extreme or more extreme than the observed one ➔ small = strong evidence against .
- 📦 Core Components: (default position) vs · test statistic (, ) · null distribution (, ) · -value · optional threshold .
- ⚡ Key Constraint: a -value measures evidence against the null only — a large never proves , it only fails to falsify it.
📝 Core
- Two question shapes ➔ virtually every test asks either “are the parameters of a model equal to some specific value?” or “does one model fit the data better than another?”; this week answers the first.
- is the default position ➔ the hypothesis held unless the data carries enough evidence to dismiss it; is what remains if it is dismissed. Framing example: vs .
- Neyman–Pearson logic ➔ “how likely would it be to see our sample by chance if were true?” — compute that probability under the null, and let its smallness be the evidence.
- Estimates never hit the null exactly ➔ even when , purely from sampling randomness ➔ the question is never “is there a difference?” but “is a difference this large plausible by chance?“.
- Test statistic ➔ the quantity whose null distribution is known and from which is computed; standardising the raw discrepancy by its standard error makes it scale-free — counts how many standard errors sits from .
- -value ➔ , tail(s) chosen by . Smaller ⟹ the observed sample is more improbable under ⟹ stronger evidence against it.
- Evidence grading (report this, not a verdict) ➔ weak/no evidence · moderate evidence · strong evidence against .
- Two-sided ignores the sign ➔ a large discrepancy in either direction contradicts , so the two tails are added; symmetry of collapses this to .
- The grey zone ➔ with a large estimated difference and a small is inconclusive, not negative: small ⟹ large standard error ⟹ small ⟹ weak evidence purely from lack of data.
- Sensitivity of and to ➔ sits in the denominator, so — weaker evidence from the same . The statistic grades a difference relative to the variability expected in a fresh sample, so a noisier population makes the same gap less surprising.
🧮 Proof Blueprint
Theorem. For with known, testing , the statistic satisfies under , so . Strategy: impose the null on the population, propagate it to the sampling distribution of , standardise, then read the tail mass beyond the observed value.
Q.E.D. ➔ the whole apparatus is the CI derivation with the roles swapped: there was unknown and bracketed, here is fixed at and the estimate is placed in the null’s tail.
⚖️ Which Tail Fires
| Test | vs | Counts as evidence | -value |
|---|---|---|---|
| Two-sided | vs | large , either sign | |
| One-sided upper | vs | large positive | |
| One-sided lower | vs | large negative |
When It Flips: the one-sided forms drop the absolute value and the factor of — same , half the . Choosing the side after seeing the data manufactures significance; is fixed by the research question before the sample is drawn.
🎯 Statistical Significance (and why the unit downplays it)
- Threshold decision ➔ pick (typically ); if declare the result statistically significant and reject .
- Cost of the rule ➔ committing to accepts that of the time is erroneously rejected — a false positive built into the procedure, not a mistake in the arithmetic.
- Deprecated in practice ➔ the unit’s stated preference is to report and interpret the evidence ( plus effect size plus ) rather than collapse it to a binary reject/not-reject.
- The threshold scales with the consequences ➔ how much evidence is enough depends on the cost of a wrong rejection. A drug that cuts mortality but carries serious side effects and legal exposure may warrant demanding before claiming an effect, not ➔ statistics supplies the objective evidence; the decision threshold is a judgement about consequences.
🚫 Why the Null Can Never Be Proved
- Falsification is one-directional ➔ small rejects; large only says this experiment failed to falsify .
- The rival-law counterexample ➔ against Ohm’s , the fabricated law predicts the same at ➔ that experiment yields a large for both, and cannot separate them.
- Discrimination needs a discriminating setup ➔ at Ohm predicts and the rival ➔ the rival is now rejected, yet Ohm is still only unfalsified: some untried setup could break it.
- The physics precedent ➔ Newtonian mechanics survives every ordinary experiment and fails at extremes; consistency with the data is never proof of truth.
⚠️ Common Mistakes
- 💡 “A large -value proves ” ➔ the single biggest mark-loser: quantifies evidence against the null, so a large is an absence of evidence, never evidence of absence. Write “insufficient evidence to reject”, never “we accept ” or ” is true”.
- 💡 Reading as ➔ is , a probability over samples; is a fixed statement with no frequentist probability, exactly as has none in a CI.
- 💡 Forgetting the factor of ➔ a two-sided test that reports one tail halves the -value and manufactures evidence; conversely, doubling a one-sided throws evidence away.
- 💡 Taking in a one-sided test ➔ the sign is the information: against gives , whereas the sign-blind version would report the wrong tail entirely.
- 💡 Confusing significance with importance ➔ at large the standard error shrinks, so a trivially small effect can clear ; report the estimated difference alongside .
🧠 Active Recall
Your test returns . A collaborator writes "we have shown the treatment has no effect". What exactly is wrong, and what should the sentence be?
Answer
- Short answer: the test only ever accumulates evidence against ; means a discrepancy this large occurs by chance about in times under the null — common — so there is weak evidence against no-effect, not evidence for it. Correct: “the data are not incompatible with no effect”.
- Why: Falsification asymmetry ➔ many different hypotheses can predict the same for one experimental setup (the counterexample), so failing to reject cannot single out as true. Only a setup where the rivals disagree can discriminate.
Two studies test the same and both report . Study A has with large; study B has with tiny. Do they say the same thing?
Answer
- Short answer: no. B is informative — with a huge the standard error is minute, so a real effect of any size would have shown; the null is genuinely compatible. A is inconclusive — the grey zone from lack of data, since is large and would flatten even a real effect.
- Why: confounds effect size with sample size ➔ scales with , so a small shrinks regardless of the truth. Always report and next to .
(Studio 5) A leukemia trial halves mortality in the treatment arm vs placebo, . Mark each true or false: (a) the treatment is useless; (b) stop developing it; (c) introduce it immediately; (d) run a larger trial.
- Hint: Separate the effect size from the strength of evidence.
Answer
- Short answer: (a) False · (b) False · (c) False · (d) True.
- Why: (a), (b) invert the falsification arrow ➔ is weak evidence against no-effect, not evidence for it; the observed halving is a potentially strong effect. (c) ignores the evidence ➔ under the null, a reduction this large or larger would arise by chance in of trials, about in . (d) is the correct read of the grey zone ➔ large effect borderline small ⟹ the standard error, not the drug, is the limiting factor, and .
A test returns . State precisely what that means, and what it does not establish.
Answer
- Short answer: if were true, of the samples you could have drawn would show a discrepancy from as large or larger than the one observed — the data are entirely unremarkable under the null, so there is no evidence against it. It does not prove .
- Why: Evidence flows one way only ➔ is computed assuming , so it can only ever measure incompatibility; out of samples being at least this extreme is the definition of “not at odds with the null”, not of “the null is true”.
Why is the two-sided -value written rather than ?
Answer
- Short answer: treats a discrepancy of the same magnitude in either direction as equally incriminating, so both tails beyond must be counted; symmetry of makes the two tails equal, hence the factor on the lower one.
- Why: The alternative selects the rejection region ➔ is the null probability of the region “at least as inconsistent with as what we saw”, and defines what inconsistent means. Under only the upper tail qualifies, so the same yields half the .