Skip to content

Showing two things are close enough with TOST

A large p-value doesn't show the absence of an effect. Equivalence testing asks directly whether the effect lies inside bounds you chose in advance.

Applied ~12 min9 steps

What runs in CodeSplash

You will be able to

  • Explain why a non-significant test doesn't demonstrate equivalence
  • Run two one-sided tests against pre-chosen bounds
  • Read the four possible outcomes of an effect and its interval

Read first

01

Absence of evidence

Read

To show that two treatments are similar, you have to say what "similar" means. The bounds [ΔL,ΔU][\Delta_L, \Delta_U] define the smallest effect size of interestSmallest effect size of interestThe smallest effect that would matter in practice; below it, an effect is treated as negligible.: anything inside them is too small to matter.

Set these before you see the data, from clinical, commercial or scientific reasoning.

02

Flip the null

Read

An equivalence testEquivalence testTests whether an effect is small enough to ignore, by rejecting effects beyond ± the SESOI. makes the difference the null and equivalence the claim:

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

Two one-sided tests (TOST) run one test against each bound. You must reject both, so the TOST p-value is the larger of the two. Equivalently: the 90% confidence interval lies entirely inside the bounds.

03

Move the bounds

Explore

Widen and narrow the bounds and watch the interval. Then raise the sample size. Can you find a setting that's significantly different from zero and equivalent at once?

BExplorable · Two one-sided tests

How do you show that two things are the same, not merely that you found no difference?

What can you conclude here?

How sure?
0.10
1.00
50
0.40
−margin+margin0

Inconclusive: neither test rejects

Equivalent when the whole 90% interval sits inside the margins. TOST p = .068; ordinary test p = .618.

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

Make your prediction to see the result.

04

Predict the verdict

Predict

Predict first

ToothGrowth with bounds of ±½ SD, which is ±3.74 units. The observed difference is 3.70. The ordinary Welch test gave p = .061.

What does TOST conclude?

EquivalentNot shown equivalent, not significantly differentSignificantly different, not equivalent
Reveal

Not shown equivalent, not significantly different. The 90% interval runs from 0.47 to 6.93, poking through the upper bound; TOST gives p = .492. The data can't distinguish a real difference from no difference, so the study is inconclusive.

05

Four outcomes

Read
The intervalDifference testTOSTRead as
Inside bounds, excludes 0SignificantEquivalentReal but too small to matter
Inside bounds, includes 0Not significantEquivalentNegligible
Crosses a bound, includes 0Not significantNot equivalentInconclusive
Outside bounds, excludes 0SignificantNot equivalentMeaningful

Sleep data, paired, ±1 hour: a difference of −1.58 hours gives ordinary p = .003 and TOST p = .915. That's a real difference and not an equivalence.

Equivalence can be shown: mtcars mpg against 20 with bounds ±2 passes both one-sided tests, TOST p = .041.

06

Other scales

Read

TOST isn't only for means. Wilcoxon TOST uses the Hodges–Lehmann shift: an estimate of 0.600 against bounds ±0.500 gives p = .675. That example compares two independent groups (the Mann–Whitney form). Fill Second measurement (paired design) instead and it becomes the paired signed-rank form, with its own shift and assumptions: choose the design on purpose.

Brunner–Munzel TOST bounds the relative effect: p^\hat p = 0.64 between 0.35 and 0.65 gives p = .443.

07

Check your understanding

Checkpoint

Check yourself

The two one-sided tests give p = 0.01 and p = 0.08. What is the TOST p-value, and is equivalence shown at the 5% level?

Show the answer

Answer: b

You must reject both one-sided tests, so the larger p-value decides. There's no multiplicity penalty, because both must succeed.

Check yourself

Which interval must lie inside the bounds for TOST at α = 0.05?

Show the answer

Answer: a

Each one-sided test has α = 0.05, which matches the two ends of a 90% interval.

Check yourself

When should you choose equivalence bounds?

Show the answer

Answer: a

Bounds chosen after seeing the data can be stretched to fit anything, which makes the test meaningless.

08

Do it in CodeSplash

In the app

Use Equivalence and minimal-effect tests directly, with Lower bound, Upper bound and Bounds are set to raw units or standardized d. Or turn on the Lens option in a t test, Mann–Whitney, Yuen, correlation or Poisson rates, and pick Equivalence (TOST).

Python
import pandas as pd
from statsmodels.stats.weightstats import ttost_ind

df = pd.read_csv("toothgrowth.csv")
oj = df.loc[df["supp"] == "OJ", "len"]
vc = df.loc[df["supp"] == "VC", "len"]
print(ttost_ind(oj, vc, low=-3.741, upp=3.741, usevar="unequal"))
R
df <- read.csv("toothgrowth.csv")
oj <- df$len[df$supp == "OJ"]
vc <- df$len[df$supp == "VC"]
# Two one-sided tests; the larger p-value is the TOST p-value.
t.test(oj, vc, mu = -3.741, alternative = "greater")
t.test(oj, vc, mu = 3.741, alternative = "less")
09

Recap

Recap
  • To claim two things are close, test that claim against bounds chosen in advance.
  • TOST rejects both one-sided nulls, which matches a 90% interval inside the bounds.
  • A result can be significant and equivalent, or neither. Both can happen and both are informative.

Concepts in this lesson