Skip to content

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.

Applied ~9 min8 steps

What runs in CodeSplash

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

Read first

01

Zero is a low bar

Read

An 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?

H0: ΔL≤Δ≤ΔUH1: Δ<ΔL  or  Δ>ΔUH_0:\ \Delta_L \le \Delta \le \Delta_U \qquad H_1:\ \Delta < \Delta_L \ \text{ or } \ \Delta > \Delta_U

It's the mirror image of equivalence: the two hypotheses swap places.

02

Predict the outcome

Predict

Predict 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?

Yes, the effect is shown to exceed the boundNo, the effect could still be below the bound
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.

03

When it passes

Read

On 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.

04

Non-inferiority

Read

A 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:

H0: Δ≤−δH1: Δ>−δH_0:\ \Delta \le -\delta \qquad H_1:\ \Delta > -\delta

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.

05

Which question do you have?

Reflect
You want to showTestLens
A is different from BOrdinary testOff
A and B are close enoughEquivalenceEquivalence (TOST)
A's effect is big enough to matterMinimal effectMinimal effect
A isn't meaningfully worse than BNon-inferiorityNon-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?

06

Check your understanding

Checkpoint

Check 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.

07

Do it in CodeSplash

In the app

In 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.

Python
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"))
R
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")
08

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