SwitasContact Us

Choose Between a Superiority, Non-Inferiority and Equivalence Test Before You Replatform or Remediate

Abstract graphic of three capsule-shaped bars of different lengths in a row, two stopping short of a faint vertical boundary line and one crossing it.

· 13 min read

At Microsoft, "around two-thirds of all changes were found to have a negative or neutral effect" on the metric they were built to move (Bojinov and Gupta, Harvard Data Science Review, 2022, citing Kohavi, Tang and Xu). That figure is usually quoted as an argument for testing everything. It is also an argument for a question most teams never ask. A replatform, an accessibility remediation and a vendor swap are going live whatever the readout says. For those, "did it lift conversion" is the wrong hypothesis, and "the test came back flat" is not the reassurance people take it for. This guide is for anyone running experiments on a commercial funnel. By the end you will be able to pick which of three hypotheses a change calls for, set the margin the no-harm version depends on, and spot the conditions that make a no-harm test pass when it should not.

Three hypotheses, three different questions

Almost every A/B test shipped in commerce is a superiority test: the null is that the variant is no better than control, and you need evidence of a gain to act. The two alternatives change what the null is, and therefore what a pass buys you.

A non-inferiority test inverts the burden. The null is that the variant is worse by at least some margin, and your job is to rule that out. The FDA's guidance for industry, Non-Inferiority Clinical Trials to Establish Effectiveness (CDER and CBER, November 2016), states the hypotheses as Ho: C − T ≥ M and Ha: C − T < M, where M is the margin, and defines the goal as showing "that the effect of the test drug (T) is not inferior to the effect of the active control (C) by a specified amount."

An equivalence test bounds the difference in both directions. The standard procedure is TOST: "the TOST procedure entails performing two one-sided tests," and "if both one-sided tests are significant, we can reject the presence of effects large enough to be meaningful," in Daniel Lakens's words. Both bounds have to be cleared, which costs more data at the same tolerance.

CriterionSuperiorityNon-inferiorityEquivalence
Question answeredIs it better?Is it not meaningfully worse?Is it the same, within tolerance?
Null hypothesisNo difference or worseWorse by at least MDiffers by at least M in either direction
Margin requiredNoYes, one-sidedYes, two-sided
What a pass licensesShip for the gainShip without an unacceptable lossTreat the two as interchangeable
What a fail licensesDo not ship for the gainNothing: the loss is not ruled out, not provenNothing: sameness is not ruled out either way
Interval to readTwo-sided 95%, lower bound vs zeroOne bound vs M (one-sided 0.025 is the FDA convention)Whole interval inside both bounds
Fails towardSafety: noise and sloppiness kill the resultDanger: anything that makes the arms look alike helps the variant passDanger, in both directions
Typical triggerA growth bet you can cancelA change you have already decided to shipA swap you want to call a non-event

Which hypothesis your change actually calls for

The hypothesis follows the decision you have already made, not the size of the change. If you would ship the change even on a flat result, you are not asking a superiority question, and you should stop pretending otherwise at readout time. If you would cancel it on a flat result, you are.

Change you are shippingHypothesisWho owns the margin
Platform migration (Magento, Shopify, Akinon, Ticimax and similar)Non-inferiority on the funnel step that carries revenueCommercial owner of that step, signed before cutover
Accessibility remediation under the European Accessibility ActNon-inferiority, with the margin set generouslyNobody can veto the change, so the margin is informational and sizes the rollback plan
Consent banner or CMP rebuildNon-inferiority on conversion, measured on a population you can still seeLegal sets the design, growth sets the margin
Payment, search or recommendation vendor swapNon-inferiority, or equivalence if the commercial case is "no worse either way"Whoever signed the vendor contract
Removing a feature to cut maintenanceNon-inferiority, margin priced against the engineering savingEngineering lead and the funnel owner jointly
Performance workSuperiority: latency moves revenue, and a 100 ms added delay at Bing cost "a 0.6% drop in total revenue"Not applicable
A new onboarding flow, pricing display or merchandising ideaSuperiorityNot applicable

The accessibility row is the one teams get wrong most often. The European Commission's page on the European Accessibility Act records that "Member States had to incorporate the European Accessibility Act into their national law by June 2022," so the remediation is not optional and the test cannot block it. The margin still earns its keep: it fixes in advance how large a loss would trigger a design revisit rather than a rollback, and it settles the post-launch argument about whether accessibility "cost us money."

Set the margin before you look at anything

The margin is a commercial number wearing statistical clothing: the largest loss you would accept and still ship. The FDA's framing separates two quantities people conflate. M1 is "the entire effect of the active control assumed to be present in the NI study"; M2 is "the largest clinically acceptable difference (degree of inferiority)." In funnel terms, M1 is the whole value at stake in the step you are changing and M2 is the slice you are willing to lose. "M2 can never be greater than M1," which means a margin wider than the value of the step is not a margin at all.

Four rules make a margin usable:

  • Prespecify it. The FDA's fixed-margin method "relies upon the choice of a fixed NI margin that is prespecified at the design stage of the NI trial." Lakens puts the same rule plainly: "the equivalence range should be specified in advance."
  • State it in relative terms, not currency. A margin of "no more than a 1% relative drop in checkout completion" survives a catalogue reprice. A margin expressed as a per-visitor amount in local currency does not, and in markets where prices are revised monthly it quietly loosens while the test runs.
  • Use the raw metric, not a standardised effect size. "It is better to specify the equivalence bounds in terms of raw effect sizes," because the person signing the margin has to recognise the number.
  • Get a signature. A margin nobody owns gets renegotiated at readout, which destroys the whole design.

Sample size is the part that surprises people, and it is not mysterious: ruling out a loss of size d costs roughly what detecting a gain of size d costs, so your existing minimum-detectable-effect arithmetic answers the question, with the one-sided convention of a 0.025 Type I error. The FDA states it directly: "typically, the one-sided Type I error is set at 0.025 by asking that the upper bound of the 95% confidence interval for C-T be less than the NI margin." Equivalence testing is the exception worth knowing: in the TOST convention "a 90% confidence interval is used when the one-sided tests are performed at an alpha level of 5%," and "it is not necessary to correct for the fact that two tests are performed."

Run that arithmetic before you commit to a margin. For many mid-market retailers in Türkiye and the region the honest answer is that a month of checkout traffic cannot rule out a 1% relative loss, and "most companies run experiments for less than a month." A margin your traffic cannot clear is a test you will fail for reasons unrelated to the change. Widen the margin and record that you did, move the measurement to a higher-traffic step, or run a staged rollout with a holdback instead.

Why a no-harm test fails dangerous

This is the asymmetry that makes non-inferiority testing worth a procedure rather than a habit. A superiority test fails safe: mess up the instrumentation, split traffic badly, let the arms contaminate each other, and the effect washes toward zero and you do not get to ship. A non-inferiority test fails the other way. The FDA says it in one sentence: "sloppiness in study design/conduct is particularly problematic, because it introduces bias towards the alternative hypothesis of non-inferiority," with the contrast that "in a superiority trial, sloppiness can lead to study failure." Elsewhere, "quality issues could result in treatment groups appearing similar," producing "apparent non-inferiority when the test drug is in fact inferior," and "adjustment for poor quality after the fact is usually not possible."

Separate two mechanisms, because they push in opposite directions and get muddled constantly. Variance widens your interval and pushes you toward a fail. Dilution, anything that drags the measured difference toward zero, pushes you toward a pass. Low power alone does not manufacture a false pass. Contamination does. The checks that matter, in order:

  • Leakage between arms. Shared carts, shared logged-in state, a CDN cache serving the variant to control, an app and a web funnel assigned independently. Any of these makes the arms more alike. Verify assignment integrity before you read the result, not after.
  • Exclusions applied after the fact. Dropping sessions, bots, outliers or a bad day is not neutral here. The FDA notes that intent-to-treat analysis is "not necessarily conservative in an NI study and can lead to an incorrect finding of non-inferiority," which is a warning about how innocently this goes wrong.
  • A population you cannot see. If a slice of traffic is unmeasured or partly modelled, the slice that disappears is not random, and the remaining comparison is not the one you designed.
  • Assay sensitivity. The original version of this problem is the sharpest. A non-inferiority trial, the FDA notes, "is dependent on knowing something that is not measured in the study," so "if the active control had no effect at all in the NI trial, then even ruling out a very small difference between control and test drug is meaningless." The funnel version: if you test in a window where the step you changed could not plausibly have shown harm, a pass tells you nothing. A dead week on a seasonal catalogue qualifies, and so does the opposite extreme. A no-harm test run across 11.11, the late-November campaign peak, or a Ramadan window that moves about eleven days earlier each year reports on a funnel under conditions you will not see again for a year.
  • Power at the margin you chose. The FDA's observation that "if the event rate in the NI study is lower than anticipated, power to demonstrate non-inferiority will be reduced" is the commercial equivalent of a conversion rate below your planning assumption. Check the realised rate early, and resize or re-margin before the window closes.

You cannot switch hypotheses after the readout

The most common failure in commercial experimentation is not a bad test. It is a superiority test that came back flat, reported as "no harm found," and shipped. That reading is not available. Altman and Bland's 1995 BMJ note is still the shortest statement of why, and it is in its title: absence of evidence is not evidence of absence. Lakens is blunter: "a non-significant result can't be interpreted as the absence of an effect."

The FDA's position on the retrospective switch is explicit. "An unplanned determination of non-inferiority following failure to show superiority" "would not be sufficient for demonstrating non-inferiority of the test drug." A superiority-designed study "would yield credible evidence of non-inferiority only if" it had the features of one, including that "the NI margin must be prespecified, and assay sensitivity and HESDE must be established."

The reverse order is fine, and it is the practical move. A trial designed for non-inferiority "may also be used to test for superiority without concern about inflating the Type I error rate," with "the Type I error rates for tests of both non-inferiority and superiority controlled at the 2.5% level." So design for non-inferiority, prespecify the margin, and if the variant turns out to be better you may say so. One caveat the guidance adds: with several endpoints or several variants, "it would not be appropriate to apply 95% confidence intervals for multiple tests of noninferiority and superiority," and wider intervals may be needed.

What this does not cover and where it breaks down

  • This is not guardrail metrics. Guardrails are, in Bojinov and Gupta's words, "the 'do no harm' metrics," answering "did the change have any adverse effects?" alongside a primary metric that answers "did the change meet the intended goal?" A guardrail is monitored. Here no-harm is the primary hypothesis, with its own margin and its own sample size. A guardrail alert is not a non-inferiority failure, and a clean guardrail is not a non-inferiority pass.
  • It assumes you can randomise. A hard cutover with no traffic split, a change search engines see, or a price you cannot show to half your visitors fall outside this method. Those need switchback, geo-level or holdback designs, with different assumptions.
  • Equivalence is rarely what you want. Most commercial cases are one-sided, and paying for the second bound buys nothing.
  • The clinical framework transfers in structure, not in force. The FDA guidance governs drug approval and nothing in it applies to your checkout. What is borrowed is the hypothesis structure, the margin discipline and the direction-of-bias warning, which are statistical facts rather than regulatory ones.
  • Bayesian equivalents are not covered. A region of practical equivalence answers a similar question with different machinery.
  • It will not tell you the margin. No method can. The margin is a judgement about how much money a decision is allowed to cost, and that judgement belongs to a person, not a calculator.

Frequently asked questions

Is a non-inferiority test just a guardrail metric with extra steps?

No. A guardrail is a secondary metric you watch for adverse effects while a primary metric answers whether the change worked. A non-inferiority test makes "no meaningful harm" the primary hypothesis, which means it gets a prespecified margin and a sample size calculated against that margin. Guardrails are usually not powered to detect the harm you care about.

How do I pick the margin if nobody will own the number?

Work backwards from the decision the test is meant to inform. Ask what size of loss would change what you do: trigger a rollback, delay a cutover, or fund a redesign. If no loss would change anything, you do not need the test. If one would, the person who would make that call owns the margin and should sign it before the test starts.

Can I run a non-inferiority test and a superiority test on the same experiment?

Yes, in that order. Design for non-inferiority with a prespecified margin, and you may also read it for superiority without inflating the error rate, both controlled at 2.5% per the FDA guidance. The reverse, deciding to claim non-inferiority after a superiority test came back flat, is not sound.

My superiority test was flat and I did not set a margin. What can I conclude?

That you did not detect a difference. You can report the confidence interval, which is genuinely informative: if the whole interval sits inside a loss you would have accepted, say that and show it, while being clear it was not the test's design. What you cannot do is relabel the result as evidence of no harm.

My site does not have the traffic to rule out a 1% loss. Now what?

Three honest options. Widen the margin to one your traffic can clear and record that you did. Move the measurement to a higher-volume step closer to the change. Or skip the test and run a staged rollout with a holdback and a pre-agreed rollback trigger, which is a monitoring design rather than a hypothesis test and should be described as such.

Do I need a different testing platform for this?

Usually not. Most of the work is in the design: the margin, the prespecification, the assignment integrity checks and reading one bound of the interval against the margin rather than against zero. If your tool reports a confidence interval on the difference, you can run the comparison yourself.

Should I use an equivalence test instead, to be safe?

Only if your commercial case genuinely needs both bounds, such as a vendor swap you want to declare a non-event in either direction. Otherwise the second bound costs data and answers a question you do not have.

Why 0.025 one-sided rather than 0.05?

Convention, borrowed from a context where a false pass is a public-health outcome: the FDA ties it to the upper bound of a two-sided 95% interval. In a TOST equivalence design the convention differs, with each one-sided test at 5% and a 90% interval read against the bounds. Pick one, write it down before the test, and do not change it at readout.

Can a compliance change be tested at all, if we have to ship it either way?

Yes, and it is worth doing, as long as everyone understands the test cannot veto the change. The output is a measured cost with an interval around it, which tells you whether to revisit the design, and gives you a defensible answer the next time someone claims the compliance work hurt conversion.

Run this on your next migration

If you have a replatform, a remediation or a vendor swap in the next quarter, the margin conversation is the one to have now, before the cutover date makes it academic. Our CRO team designs and runs these tests, sets the margins with the people who own the funnel, and checks assignment integrity before anyone reads a result. See how we run experimentation programmes, or bring us the change you have already decided to ship.

Sources

  • U.S. Food and Drug Administration, Non-Inferiority Clinical Trials to Establish Effectiveness, Guidance for Industry, CDER and CBER, November 2016: PDF and guidance landing page
  • Daniel Lakens, "Equivalence Testing and Interval Hypotheses", chapter 9 of Improving Your Statistical Inferences (open online textbook; the chapter page carries no version date): lakens.github.io
  • Lakens, D. (2017), "Equivalence Tests: A Practical Primer for t Tests, Correlations, and Meta-Analyses", Social Psychological and Personality Science 8(4), 355–362: doi:10.1177/1948550617697177
  • Altman, D. G. and Bland, J. M. (1995), "Absence of evidence is not evidence of absence", BMJ 311(7003), 485: PMC2550545
  • Bojinov, I. and Gupta, S. (2022), "Online Experimentation: Benefits, Operational and Methodological Challenges, and Scaling Guide", Harvard Data Science Review 4(3): hdsr.mitpress.mit.edu
  • European Commission, "The European Accessibility Act": commission.europa.eu, linking the official text of Directive (EU) 2019/882

Related articles

All articles →

Let's build the next one.

Contact Us