Beyond zero: minimal effects and non-inferiority
With enough data, tiny effects become significant. A minimal-effect test asks whether the effect is big enough to matter, and non-inferiority asks whether it's not too much worse.
What runs in CodeSplash
- STAT288Minimum effect test Runs in CodeSplash
- Equivalence and minimal-effect tests (TOST) Verified in Python and R
- Two-sample t-test (Welch / Student, or z test) Verified in Python and R
You will be able to
- State the null hypothesis of a minimal-effect test
- Set up a non-inferiority test with a defensible margin
- Choose among difference, equivalence, minimal-effect and non-inferiority questions
Zero is a low bar
ReadAn ordinary test asks whether the effect differs from zero. With a big enough sample, nearly anything does. A minimal-effect testMinimal-effect testAsks whether an effect is larger than the smallest size that matters, rather than whether it differs from zero. raises the bar: is the effect larger than the smallest one you'd care about?
It's the mirror image of equivalence: the two hypotheses swap places.
Predict the outcome
PredictPredict first
Two groups differ by 0.600 units with an ordinary p = .019. You decided in advance that only differences above 0.300 units matter.
Is the effect shown to be big enough to matter?
Reveal
No. Against the bound, p = .104, and the verdict is "not shown meaningful". The 90% interval reaches down to 0.20, below the bound. The effect is compatible with both trivial and meaningful sizes.
When it passes
ReadOn the sleep study, with a paired Wilcoxon test and bounds of ±½ hour, the estimated pseudo-median is 1.30 hours. The test gives p = .005 and the verdict "meaningful effect". Even the low end of the interval, 1 hour, is above the bound.
Non-inferiority
ReadA new, cheaper treatment doesn't have to beat the old one. It needs only to be not meaningfully worse. Non-inferiority uses one bound, the margin:
ToothGrowth with a margin of 2 units: OJ minus VC is 3.70, ordinary p = .060, but non-inferiority gives p = .002, verdict: non-inferior.
Which question do you have?
Reflect| You want to show | Test | Lens |
|---|---|---|
| A is different from B | Ordinary test | Off |
| A and B are close enough | Equivalence | Equivalence (TOST) |
| A's effect is big enough to matter | Minimal effect | Minimal effect |
| A isn't meaningfully worse than B | Non-inferiority | Non-inferiority |
Take a comparison you've run recently. Was "different from zero" what you wanted to show, or was one of the others your real question?
Check your understanding
CheckpointCheck yourself
In a minimal-effect test, what does the null hypothesis say?
Show the answer
Answer: b
The null is "negligible", and rejecting it supports a meaningful effect. Equivalence testing swaps these around.
Check yourself
A/B test with a million users: lift of 0.01%, ordinary p < 0.001, minimum worthwhile lift 0.5%. Which test exposes the problem?
Show the answer
Answer: a
The ordinary test can only say the lift isn't zero. Testing against the smallest worthwhile lift asks whether it's worth acting on.
Check yourself
What makes a non-inferiority result credible?
Show the answer
Answer: b
The p-value only means something relative to the margin, so the margin needs its own justification.
Do it in CodeSplash
In the appIn Equivalence and minimal-effect tests, set Hypothesis to Minimal effect and choose Meaningful in which direction. For non-inferiority, turn on Lens in a t test and pick Non-inferiority. The card states the verdict in words.
import pandas as pd
from scipy import stats
df = pd.read_csv("a_xy_long.csv")
x = df.loc[df["sample"] == "x", "value"]
y = df.loc[df["sample"] == "y", "value"]
bound = 0.3
# Is the difference above the upper bound?
print(stats.ttest_ind(x - bound, y, equal_var=False, alternative="greater"))df <- read.csv("a_xy_long.csv")
x <- df$value[df$sample == "x"]
y <- df$value[df$sample == "y"]
# Is the difference above the upper bound?
t.test(x, y, mu = 0.3, alternative = "greater")Recap
Recap- Zero is often the wrong null. Test against the smallest effect you'd act on.
- A minimal-effect test is the mirror image of equivalence.
- Non-inferiority is one-sided, and it's only as credible as its margin.
Concepts in this lesson