Tutorials › Biostatistics › Sample Size for Equivalence Trials

Clinical Trial Design & Sample Size

Sample Size for Equivalence Trials

A practical guide to planning equivalence studies, including equivalence margins, the two one-sided tests procedure, continuous and binary endpoints, power calculations, dropout inflation, a complete worked example, and implementation in R.

Intermediate 16 min read

What You'll Learn

  • What an equivalence trial is designed to demonstrate
  • How equivalence margins define the sample-size problem
  • How the two one-sided tests procedure establishes equivalence
  • How to calculate sample size for a continuous endpoint
  • How power, variability, and the equivalence margin affect sample size
  • How to account for dropout and extend the calculation to binary endpoints

Introduction

Many clinical trials are designed to determine whether a new treatment is better than a comparator. An equivalence trial asks a fundamentally different question: Is the difference between the two treatments sufficiently small that they can be regarded as clinically equivalent?

This distinction has major consequences for sample-size planning. In a superiority trial, the investigator typically wants enough patients to detect a clinically important difference. In an equivalence trial, the investigator wants enough patients to demonstrate that the treatment difference lies inside a prespecified interval of clinically acceptable differences.

Key idea: An equivalence trial does not prove that two treatments are mathematically identical. It demonstrates, with prespecified statistical confidence, that their difference is small enough to fall within a clinically acceptable equivalence margin.

Superiority, Non-Inferiority, and Equivalence

It is important to distinguish three common objectives.

Trial Objective Basic Question
Superiority Is the treatment better than the comparator?
Non-inferiority Is the treatment not unacceptably worse than the comparator?
Equivalence Is the treatment difference small enough in either direction to be clinically acceptable?

For equivalence, both directions matter. A treatment that is substantially better than the comparator may fall outside the equivalence region just as a treatment that is substantially worse may do so.

Therefore, equivalence requires evidence that the treatment difference is neither too negative nor too positive.

The Equivalence Margin

The central quantity in an equivalence trial is the equivalence margin. Let the treatment effect be defined as:

\[ \Delta=\mu_T-\mu_C \]

where:

  • \(\mu_T\) is the mean outcome under the test treatment.
  • \(\mu_C\) is the mean outcome under the comparator.
  • \(\Delta\) is the treatment difference.

Suppose the clinically acceptable difference is at most \(M\) in either direction. The equivalence region is then:

\[ -M<\Delta

The value \(M\) is the equivalence margin.

The margin is a clinical quantity, not merely a statistical quantity. A smaller margin makes equivalence harder to demonstrate and therefore usually requires a larger sample size. The margin should be justified using clinical considerations rather than selected simply because it produces a convenient sample size.

The Equivalence Hypotheses

For a symmetric equivalence margin, the null hypothesis is:

\[ H_0:\Delta\le -M \quad\text{or}\quad \Delta\ge M \]

The alternative hypothesis is:

\[ H_A:-M<\Delta

This is fundamentally different from a conventional two-sided superiority test. For superiority, the null hypothesis is usually:

\[ H_0:\Delta=0 \]

For equivalence, the null hypothesis represents non-equivalence.

Important: In an equivalence trial, failure to find a statistically significant difference is not sufficient to establish equivalence. A nonsignificant superiority test can simply reflect inadequate precision. Equivalence requires the confidence interval for the treatment difference to fit completely inside the prespecified equivalence interval.

The Two One-Sided Tests Procedure

The standard framework for testing equivalence is the two one-sided tests procedure, commonly abbreviated TOST. The two hypotheses are:

\[ H_{01}:\Delta\le -M \qquad\text{vs.}\qquad H_{A1}:\Delta>-M \]

and:

\[ H_{02}:\Delta\ge M \qquad\text{vs.}\qquad H_{A2}:\Delta

Equivalence is concluded only when both one-sided null hypotheses are rejected.

1
Test whether the treatment difference is sufficiently greater than the lower equivalence boundary \(-M\).
2
Test whether the treatment difference is sufficiently less than the upper equivalence boundary \(M\).
3
Conclude equivalence only if both one-sided tests reject.

The Confidence-Interval Interpretation

TOST has a particularly useful confidence-interval interpretation. For an overall type I error of \(\alpha=0.05\), equivalence is established when the corresponding 90% confidence interval for the treatment difference lies entirely inside the equivalence interval.

\[ -M

where \(L\) and \(U\) are the lower and upper confidence limits.

Confidence Interval Conclusion
Entirely inside \((-M,M)\) Equivalence demonstrated
Crosses \(-M\) Equivalence not demonstrated
Crosses \(M\) Equivalence not demonstrated
Extends beyond both margins Equivalence not demonstrated
Practical rule: For a two-sided equivalence assessment with overall \(\alpha=0.05\), think in terms of a 90% confidence interval: the entire interval must fit inside the equivalence margins.

Why Equivalence Trials Can Require Large Samples

The central challenge is that demonstrating equivalence requires precision. Suppose the true treatment difference is actually zero. If the sample is small, the estimated difference may have a wide confidence interval:

\[ [-8,\;8] \]

If the equivalence margin is:

\[ M=5 \]

then the confidence interval extends outside the equivalence region even though the observed difference may be close to zero.

A larger sample reduces the standard error and narrows the confidence interval.

Therefore: equivalence trials are often precision-driven rather than effect-driven.

Key Inputs for Sample Size Calculation

For a continuous endpoint, the sample-size calculation typically requires:

  • Equivalence margin \(M\)
  • Expected treatment difference \(\Delta\)
  • Standard deviation \(\sigma\)
  • Type I error \(\alpha\)
  • Desired power \(1-\beta\)
  • Allocation ratio between treatment groups
  • Expected dropout or non-evaluable rate

These quantities determine how precisely the treatment difference can be estimated.

Symmetric vs. Asymmetric Equivalence Margins

The simplest situation uses symmetric margins:

\[ -M<\Delta

However, the acceptable difference need not be symmetric. Suppose the clinically acceptable limits are \(M_L\) and \(M_U\). Then the equivalence region becomes:

\[ -M_L<\Delta

For example, an investigator might tolerate a slightly larger difference in one direction than the other.

Margin Type Equivalence Region
Symmetric \(-M<\Delta
Asymmetric \(-M_L<\Delta

The sample-size calculation must reflect the actual margins used in the statistical analysis.

Continuous Endpoint Sample Size

Consider a parallel-group trial comparing two treatments using a continuous endpoint. Assume:

  • Equal sample sizes in the two groups
  • Common standard deviation \(\sigma\)
  • Expected true difference \(\Delta\)
  • Symmetric equivalence margin \(M\)

For planning purposes, a commonly used large-sample approximation for the required sample size per group is:

\[ n = \frac{ 2\sigma^2 \left( z_{1-\alpha}+z_{1-\beta} \right)^2 }{ (M-|\Delta|)^2 } \]

This formula assumes the expected treatment difference lies inside the equivalence region.

Important: The quantity \(M-|\Delta|\) is the distance from the assumed true treatment difference to the nearer equivalence boundary. If the expected difference is not zero, the sample size can be larger than the simple zero-difference case.

When the Expected Difference Is Zero

The most straightforward planning assumption is:

\[ \Delta=0 \]

The sample-size formula simplifies to:

\[ n = \frac{ 2\sigma^2 \left( z_{1-\alpha}+z_{1-\beta} \right)^2 }{ M^2 } \]

This is one of the most useful formulas for understanding equivalence-study sample size.

The sample size increases with the square of the standard deviation and decreases with the square of the equivalence margin.

What Does the Equivalence Margin Do to Sample Size?

Suppose everything else remains constant. If the margin is cut in half:

\[ M_{\text{new}}=\frac{M}{2} \]

then the required sample size increases by approximately:

\[ \left(\frac{M}{M/2}\right)^2=4 \]

Therefore, halving the equivalence margin can approximately quadruple the sample size.

Equivalence Margin Relative Sample Size
\(M\) 1.00
\(0.75M\) Approximately 1.78
\(0.50M\) Approximately 4.00
\(0.25M\) Approximately 16.00
Design implication: The equivalence margin is often one of the most influential inputs in the entire sample-size calculation. A clinically unrealistic margin can make the study unnecessarily large, while an overly generous margin can make the equivalence conclusion clinically unconvincing.

What Does Variability Do to Sample Size?

Because the sample-size formula contains \(\sigma^2\), variability has a quadratic effect.

\[ n\propto\sigma^2 \]

If the standard deviation increases by 20%, the sample size increases by approximately:

\[ 1.2^2=1.44 \]

or 44%.

This is why reliable estimates of variability are important during trial planning. Potential sources include:

  • Previous clinical trials
  • Pilot studies
  • Published studies
  • Historical control data
  • Relevant external datasets

What Does Power Do to Sample Size?

Higher power requires a larger sample. For example:

Power \(z_{1-\beta}\) Relative Effect
80% 1.282 Reference
90% 1.282?* Larger than 80%
95% 1.645 Still larger

More precisely, the standard normal quantiles commonly used are:

Power \(z_{1-\beta}\)
80% 1.282
85% 1.440
90% 1.645
95% 1.960

The higher the desired power, the more patients are needed to obtain the required precision.

Type I Error in Equivalence Trials

Suppose the overall significance level is:

\[ \alpha=0.05 \]

The two one-sided tests are generally conducted at the same one-sided level:

\[ \alpha_{\text{TOST}}=0.05 \]

The corresponding equivalence confidence interval is therefore:

\[ 100(1-2\alpha)\%=90\% \]

Thus, a 5% TOST framework corresponds to a 90% confidence interval for equivalence.

Common mistake: Do not automatically divide 0.05 by two and use 0.025 for each one-sided TOST test. The two one-sided tests are each typically performed at \(\alpha=0.05\), which corresponds to a 90% two-sided confidence interval.

A Complete Worked Example

Suppose a randomized, parallel-group equivalence trial compares a new treatment with an established comparator. The primary endpoint is a continuous measurement for which lower and higher values have the same clinical interpretation around the target difference. The investigator defines an equivalence margin of:

\[ M=5 \]

meaning that treatment differences between \(-5\) and \(+5\) are considered clinically acceptable.

The planning assumptions are:

Parameter Planning Value
Equivalence margin \(M\) 5 units
Expected treatment difference \(\Delta\) 0 units
Standard deviation \(\sigma\) 10 units
One-sided TOST \(\alpha\) 0.05
Target power 90%
Allocation 1:1
Expected dropout 10%

Step 1: Define the Equivalence Region

The equivalence margin is:

\[ M=5 \]

Therefore, the equivalence region is:

\[ -5<\Delta<5 \]

The null hypothesis represents non-equivalence:

\[ H_0:\Delta\le-5 \quad\text{or}\quad \Delta\ge5 \]

The alternative is:

\[ H_A:-5<\Delta<5 \]

Step 2: Specify the Expected Difference

For planning purposes, assume the true treatment difference is:

\[ \Delta=0 \]

The expected difference is therefore centered in the equivalence region.

Step 3: Specify the Standard Deviation

Suppose previous data suggest:

\[ \sigma=10 \]

Thus:

\[ \sigma^2=100 \]

Step 4: Specify Type I Error and Power

Use:

\[ \alpha=0.05 \]

and:

\[ 1-\beta=0.90 \]

Therefore:

\[ \beta=0.10 \]

The corresponding standard normal quantiles are approximately:

\[ z_{1-\alpha}=z_{0.95}\approx1.645 \]

and:

\[ z_{1-\beta}=z_{0.90}\approx1.282 \]

Step 5: Apply the Sample-Size Formula

Because \(\Delta=0\), use:

\[ n = \frac{ 2\sigma^2 \left( z_{1-\alpha}+z_{1-\beta} \right)^2 }{ M^2 } \]

Substituting the planning values:

\[ n = \frac{ 2(10^2)(1.645+1.282)^2 }{ 5^2 } \]

First calculate the sum of the normal quantiles:

\[ 1.645+1.282=2.927 \]

Then square it:

\[ 2.927^2\approx8.567 \]

Therefore:

\[ n = \frac{ 2(100)(8.567) }{ 25 } \]

which gives approximately:

\[ n\approx68.5 \]

Because the sample size must be an integer, round upward:

\[ \boxed{n=69\text{ patients per group}} \]
Initial result: The trial requires approximately 69 evaluable patients per treatment group, or 138 evaluable patients in total, under these planning assumptions.

Step 6: Inflate for Dropout

Suppose the investigator anticipates a 10% dropout or non-evaluable rate. The retained fraction is:

\[ 1-0.10=0.90 \]

The inflation formula is:

\[ n_{\text{randomized}} = \frac{n_{\text{evaluable}}}{1-d} \]

where \(d\) is the anticipated dropout proportion. Thus:

\[ n_{\text{randomized}} = \frac{69}{0.90} \approx76.67 \]

Round upward:

\[ \boxed{77\text{ patients per group}} \]

Therefore the total randomized sample size becomes:

\[ N_{\text{total}} = 2(77) = 154 \]
Final worked-example design: Plan to randomize 154 patients, with 77 patients per treatment group, to obtain approximately 69 evaluable patients per group after allowing for 10% dropout.

Step 7: Interpret the Result

The calculation does not mean that the treatment difference must be exactly zero. Instead, the design is powered to demonstrate that the treatment difference can be estimated precisely enough that the relevant confidence interval is likely to fit inside:

\[ (-5,\;5) \]

If the observed treatment difference is close to zero and the sample is large enough to provide adequate precision, the confidence interval may fall completely within the equivalence margins.

If the confidence interval extends beyond either margin, equivalence is not demonstrated.

Visualizing the Equivalence Decision

Suppose the equivalence margins are:

\[ -M=-5 \qquad\text{and}\qquad M=5 \]

Consider several hypothetical 90% confidence intervals.

90% CI Conclusion
\([-3.0,3.2]\) Equivalence demonstrated
\([-4.7,4.8]\) Equivalence demonstrated
\([-5.2,3.1]\) Equivalence not demonstrated
\([-2.0,5.4]\) Equivalence not demonstrated
\([-7.0,6.5]\) Equivalence not demonstrated
A
Entire CI inside margins: conclude equivalence.
B
CI crosses either margin: equivalence has not been demonstrated.
C
CI entirely outside the equivalence region: the data are incompatible with the prespecified equivalence claim.

Why "No Significant Difference" Is Not Equivalence

This is one of the most common misunderstandings in equivalence studies. Suppose a conventional superiority test produces:

\[ p=0.40 \]

An investigator might incorrectly conclude: "The treatments are equivalent because there is no significant difference."

That conclusion is not justified. A nonsignificant result can occur because the study is too small to distinguish the treatments.

For example, a very wide confidence interval such as:

\[ [-20,20] \]

may contain zero but clearly does not establish that the treatment difference is within a clinically acceptable interval of \([-5,5]\).

Superiority asks: "Can we detect a difference?"

Equivalence asks: "Can we estimate the difference precisely enough to rule out clinically important differences in either direction?"

Sample Size When the Expected Difference Is Not Zero

The expected treatment difference may not be exactly zero. Suppose:

\[ \Delta=2 \]

while the equivalence margin remains:

\[ M=5 \]

The distance from the expected difference to the nearer boundary is:

\[ M-|\Delta| = 5-2 = 3 \]

The approximate sample-size formula becomes:

\[ n = \frac{ 2\sigma^2 \left( z_{1-\alpha}+z_{1-\beta} \right)^2 }{ (M-|\Delta|)^2 } \]

Compared with the zero-difference case, the denominator has decreased from \(5^2\) to \(3^2\). Therefore, substantially more patients are required.

Planning insight: If the expected treatment difference approaches an equivalence boundary, the sample size can increase dramatically. As \(|\Delta|\) approaches \(M\), the quantity \(M-|\Delta|\) approaches zero, making equivalence increasingly difficult to demonstrate.

Effect of the Expected Difference

Expected Difference Distance to Nearest Margin Relative Difficulty
\(\Delta=0\) \(M\) Lowest sample size
\(\Delta=1\) \(M-1\) Higher
\(\Delta=2\) \(M-2\) Higher
\(\Delta=4\) \(M-4\) Much higher
\(\Delta\rightarrow M\) \(\rightarrow0\) Extremely difficult

Unequal Allocation

The simplest formula assumes a 1:1 allocation ratio. Suppose the ratio of test to control patients is:

\[ k=\frac{n_T}{n_C} \]

Unequal allocation generally reduces statistical efficiency compared with equal allocation when the per-patient variance is similar in the two groups. For a fixed total sample size, balanced allocation typically provides the smallest variance of the treatment-difference estimator.

Practical point: A 1:1 allocation is usually statistically efficient when there is no strong clinical, ethical, recruitment, or operational reason to use a different allocation ratio.

Dropout Inflation

Dropout should be incorporated after determining the required number of evaluable patients. If:

\[ d=0.10 \]

then:

\[ n_{\text{randomized}} = \frac{n_{\text{evaluable}}}{0.90} \]

The resulting number should be rounded upward.

Dropout Rate Inflation Factor
5% 1.053
10% 1.111
15% 1.176
20% 1.250
25% 1.333

For example, if 100 evaluable patients are required and dropout is expected to be 20%:

\[ \frac{100}{0.80}=125 \]

Therefore, approximately 125 patients should be randomized.

Dropout Is Not Always the Same as Missingness

The sample-size inflation assumption should correspond to the actual analysis population and endpoint. For example, an investigator may need to distinguish:

  • Permanent treatment discontinuation
  • Loss to follow-up
  • Missing endpoint measurements
  • Protocol deviations
  • Patients excluded from the primary analysis

The statistical analysis plan should clearly define how these situations are handled.

Sample Size for Binary Equivalence Endpoints

Equivalence trials can also use binary endpoints. Examples include:

  • Clinical success rate
  • Response rate
  • Cure rate
  • Event-free proportion
  • Proportion achieving a predefined target

For a binary endpoint, the treatment effect may be expressed as a risk difference:

\[ \Delta=p_T-p_C \]

or using another effect measure such as a risk ratio or odds ratio.

For a risk-difference equivalence assessment, the equivalence region might be:

\[ -M< p_T-p_C

The sample-size calculation is more complicated than the continuous-endpoint case because the variance depends on the underlying event probabilities.

Approximate Variance for a Risk Difference

For independent groups, the variance of the estimated risk difference can be approximated by:

\[ \operatorname{Var}(\hat p_T-\hat p_C) = \frac{p_T(1-p_T)}{n_T} + \frac{p_C(1-p_C)}{n_C} \]

Under equal allocation:

\[ n_T=n_C=n \]

so:

\[ \operatorname{Var}(\hat p_T-\hat p_C) = \frac{ p_T(1-p_T)+p_C(1-p_C) }{ n } \]

A normal-approximation sample-size calculation can then be constructed using the relevant equivalence margins and assumed event rates.

Caution: Binary equivalence sample-size calculations can be sensitive to the assumed event rates, margin, analysis method, and whether the effect is defined as a risk difference, risk ratio, or odds ratio. Exact or method-specific calculations may therefore be preferable to a simple normal approximation.

Ratio-Scale Endpoints

Many clinical endpoints are naturally analyzed on a ratio scale. Examples include:

  • Pharmacokinetic exposure
  • AUC
  • Cmax
  • Geometric mean ratios
  • Log-transformed laboratory measures

Suppose the treatment effect is expressed as a ratio:

\[ \theta=\frac{\mu_T}{\mu_C} \]

Equivalence might be defined by:

\[ L<\theta

For ratio-scale endpoints, calculations are often performed on the logarithmic scale.

\[ \log(\theta) = \log(\mu_T)-\log(\mu_C) \]

The equivalence limits become:

\[ \log(L)<\log(\theta)<\log(U) \]

This converts a ratio-equivalence problem into a difference problem on the log scale.

Why Log Transformation Is Useful

Suppose the equivalence range is:

\[ 0.80<\theta<1.25 \]

The corresponding log-scale limits are:

\[ \log(0.80)<\log(\theta)<\log(1.25) \]

Because:

\[ \log(0.80)\approx-0.2231 \]

and:

\[ \log(1.25)\approx0.2231 \]

the ratio-equivalence problem becomes approximately symmetric on the logarithmic scale.

Equivalence vs. Non-Inferiority Sample Size

The two designs are related but not identical. A non-inferiority trial generally has one critical direction. For example:

\[ \Delta>-M \]

An equivalence trial requires both:

\[ \Delta>-M \]

and:

\[ \Delta

Thus, equivalence requires adequate precision on both sides of the equivalence region.

Feature Non-Inferiority Equivalence
Number of margins Usually one Two
Direction of concern One direction Both directions
Typical CI interpretation One boundary must be excluded Entire CI must fit inside both boundaries
TOST No Yes

Sample Size and the Width of the Confidence Interval

A useful conceptual approximation is:

\[ SE(\hat\Delta)\propto\frac{1}{\sqrt n} \]

Therefore, quadrupling the sample size approximately halves the standard error.

\[ n\rightarrow4n \qquad\Rightarrow\qquad SE\rightarrow\frac{SE}{2} \]

This explains why relatively large studies may be necessary when the equivalence margin is narrow.

What Happens If the Margin Is Too Wide?

A very wide margin makes equivalence statistically easy to demonstrate. For example, suppose the true difference is zero and the margin is:

\[ M=20 \]

It may require relatively few patients to show that the confidence interval fits inside \([-20,20]\).

But statistical ease does not make the margin clinically appropriate.

Clinical principle: The equivalence margin should represent the largest difference that would not matter clinically, scientifically, or from the perspective of the intended decision. A statistically convenient margin is not necessarily a scientifically defensible margin.

What Happens If the Margin Is Too Narrow?

The opposite problem can occur when the margin is extremely narrow. Suppose:

\[ M=1 \]

while the standard deviation remains:

\[ \sigma=10 \]

The sample-size requirement can become very large because the study must estimate the treatment difference with extremely high precision.

The investigator should therefore ask whether the proposed margin is both:

  • Clinically meaningful
  • Statistically feasible

Power as a Function of the True Difference

Equivalence power is not necessarily the same for every true treatment difference inside the equivalence region. If the true difference is exactly zero, it is centrally located. If the true difference is close to one of the equivalence boundaries, the study has less statistical distance to that boundary.

For example, with:

\[ -M<\Delta

the most favorable location is often near:

\[ \Delta=0 \]

while power decreases as the true difference approaches either boundary.

Important: When planning an equivalence study, investigators should consider whether the chosen power assumption should be based on a true difference of zero or on a more conservative clinically plausible difference.

Sample Size Sensitivity Analysis

A robust sample-size assessment should examine how the required sample changes under different assumptions. For example:

Scenario Margin SD Power Expected Impact
Base case 5 10 90% Reference
Narrower margin 4 10 90% Much larger N
Higher variability 5 12 90% Higher N
Higher power 5 10 95% Higher N
Lower power 5 10 80% Lower N

This type of sensitivity analysis can reveal which planning assumptions dominate the study size.

R Implementation for the Worked Example

The approximate continuous-endpoint calculation can be implemented directly in R.

alpha <- 0.05
power <- 0.90

sigma <- 10
margin <- 5
delta <- 0

z_alpha <- qnorm(1 - alpha)
z_beta  <- qnorm(power)

n_per_group <-
  2 * sigma^2 *
  (z_alpha + z_beta)^2 /
  (margin - abs(delta))^2

ceiling(n_per_group)

The resulting sample size is approximately:

# 69

Thus approximately 69 evaluable patients are required per group.

Inflating the Sample Size for Dropout in R

dropout <- 0.10

n_randomized_per_group <-
  ceiling(n_per_group / (1 - dropout))

n_randomized_total <-
  2 * n_randomized_per_group

n_randomized_per_group
n_randomized_total

The result is:

# 77 patients per group
# 154 patients total

Writing a Reusable R Function

A reusable function makes it easier to perform sensitivity analyses.

equiv_n <- function(
  margin,
  sigma,
  delta = 0,
  alpha = 0.05,
  power = 0.90,
  dropout = 0
) {

  effective_margin <-
    margin - abs(delta)

  if (effective_margin <= 0) {
    stop(
      "Expected difference must lie inside the equivalence region."
    )
  }

  z_alpha <- qnorm(1 - alpha)
  z_beta  <- qnorm(power)

  n_evaluable <-
    2 * sigma^2 *
    (z_alpha + z_beta)^2 /
    effective_margin^2

  n_randomized <-
    ceiling(
      n_evaluable / (1 - dropout)
    )

  list(
    n_evaluable_per_group =
      ceiling(n_evaluable),

    n_randomized_per_group =
      n_randomized,

    n_randomized_total =
      2 * n_randomized
  )
}

For the worked example:

equiv_n(
  margin = 5,
  sigma = 10,
  delta = 0,
  alpha = 0.05,
  power = 0.90,
  dropout = 0.10
)

This returns approximately:

$n_evaluable_per_group
# 69

$n_randomized_per_group
# 77

$n_randomized_total
# 154

Performing a Margin Sensitivity Analysis

The effect of the equivalence margin can be examined by evaluating several candidate margins.

margins <- c(3, 4, 5, 6, 7)

sample_sizes <- sapply(
  margins,
  function(m) {

    ceiling(
      2 * sigma^2 *
      (qnorm(1 - alpha) + qnorm(power))^2 /
      m^2
    )
  }
)

data.frame(
  margin = margins,
  n_per_group = sample_sizes
)

This produces a simple sensitivity table showing how dramatically the required sample can change as the margin changes.

Evaluating Different Power Levels

powers <- c(0.80, 0.85, 0.90, 0.95)

sample_sizes <- sapply(
  powers,
  function(pow) {

    ceiling(
      2 * sigma^2 *
      (
        qnorm(1 - alpha) +
        qnorm(pow)
      )^2 /
      margin^2
    )
  }
)

data.frame(
  power = powers,
  n_per_group = sample_sizes
)

This allows the design team to see the cost of increasing the target power.

Evaluating Different Standard Deviations

sds <- c(8, 9, 10, 11, 12)

sample_sizes <- sapply(
  sds,
  function(s) {

    ceiling(
      2 * s^2 *
      (
        qnorm(1 - alpha) +
        qnorm(power)
      )^2 /
      margin^2
    )
  }
)

data.frame(
  standard_deviation = sds,
  n_per_group = sample_sizes
)

This is particularly useful when historical studies provide a range rather than a single reliable estimate of variability.

Exact vs. Approximate Sample Size Calculations

The formula presented for the continuous endpoint is an approximate normal-theory calculation. For many planning situations, this is a useful starting point. However, exact sample-size calculations may account for:

  • Finite-sample t distributions
  • Unknown variance
  • Unequal variances
  • Unequal allocation
  • Non-normal endpoints
  • Binary outcomes
  • Ratio-scale outcomes
  • Specific analysis models

When the final analysis uses a particular statistical model, the sample-size calculation should be aligned with that analysis.

Planning principle: The sample-size method should match the estimand, endpoint, analysis model, equivalence margins, and primary hypothesis-testing procedure specified for the trial.

Repeated Measures and Covariate Adjustment

Some equivalence trials analyze repeated measurements or adjust for baseline covariates. Covariate adjustment can improve precision when the covariate explains a substantial proportion of outcome variability.

For example, if an ANCOVA model reduces the residual variance relative to an unadjusted analysis, the required sample size may decrease.

However, this should not be assumed automatically. The planning calculation should reflect the anticipated residual variability under the prespecified analysis.

Clustered or Multicenter Designs

If participants are clustered within centers or other units, observations may not be independent. The effective sample size can be reduced by within-cluster correlation. A design effect may be approximated by:

\[ DE=1+(m-1)\rho \]

where:

  • \(m\) is the average cluster size.
  • \(\rho\) is the intracluster correlation coefficient.

A rough inflation is then:

\[ n_{\text{clustered}} = n_{\text{independent}}\times DE \]

The appropriate approach depends on the actual analysis model and trial structure.

Equivalence Margin Selection

The most important non-statistical decision in an equivalence study is often the choice of the margin. A defensible process should consider:

  • Clinical relevance
  • Historical treatment effects
  • Measurement variability
  • Patient perspective
  • Risk-benefit considerations
  • Regulatory expectations
  • The intended interpretation of the endpoint

The margin should be established before the study begins.

Do not reverse-engineer the margin. Starting with a desired sample size and then selecting a margin that produces that sample size can undermine the scientific rationale for the study.

Preserving the Comparator Effect

In some equivalence settings, the scientific justification for the margin depends on historical evidence concerning the comparator. This is particularly important when the goal is to establish that a new treatment retains clinically important properties of an established treatment.

The equivalence margin should therefore be justified in relation to the clinical effect that would be considered acceptable to lose.

Sample Size and Study Credibility

A study can be statistically valid but clinically unconvincing if its equivalence margin is poorly justified. Conversely, a clinically reasonable margin may require a large sample.

This creates an important design tradeoff:

1
Define the clinically acceptable difference.
2
Estimate the expected variability.
3
Choose the desired power and significance level.
4
Calculate the required evaluable sample size.
5
Inflate for dropout and other losses.

Common Sample-Size Mistakes

  1. Using a superiority sample-size formula. Equivalence has a different hypothesis structure and requires an equivalence margin.
  2. Defining equivalence as "p > 0.05." A nonsignificant superiority test does not establish equivalence.
  3. Choosing the margin for convenience. The equivalence margin should be clinically justified.
  4. Using the wrong confidence level. A 5% TOST framework corresponds to a 90% two-sided confidence interval.
  5. Ignoring the expected treatment difference. If the expected difference is close to an equivalence boundary, the required sample size can increase substantially.
  6. Underestimating variability. Because sample size is proportional to \(\sigma^2\), modest changes in variability can materially affect the required N.
  7. Forgetting dropout inflation. The calculated number of evaluable patients is not necessarily the number that should be randomized.
  8. Ignoring the analysis scale. Ratio-based endpoints often require calculations on the log scale.
  9. Using a continuous-endpoint formula for a binary endpoint. Binary endpoints require their own variance and effect-measure assumptions.
  10. Failing to match the sample-size calculation to the primary analysis. The design, estimand, endpoint, and analysis model should be internally consistent.

A Practical Equivalence Trial Workflow

1
Define the primary endpoint.
2
Define the treatment effect measure.
3
Define the lower and upper equivalence margins.
4
Justify the equivalence margins clinically.
5
Specify the expected treatment difference.
6
Estimate the endpoint variability or event rates.
7
Specify the one-sided TOST type I error.
8
Specify the desired power.
9
Calculate the required evaluable sample size.
10
Inflate for dropout and other anticipated losses.
11
Perform sensitivity analyses over plausible assumptions.
12
Document the final assumptions and statistical decision rule in the protocol.

What Should Be Reported in the Protocol?

The sample-size section should allow another statistician to reproduce the calculation. At minimum, document:

  • Primary endpoint
  • Effect measure
  • Equivalence margins
  • Clinical rationale for the margins
  • Expected treatment difference
  • Standard deviation or event-rate assumptions
  • Type I error
  • Target power
  • Allocation ratio
  • Required evaluable sample size
  • Expected dropout rate
  • Final randomized sample size
  • Sample-size calculation method
  • Software used
  • Relevant assumptions

Worked Example Summary

Component Value
Design Two-arm parallel equivalence trial
Endpoint Continuous
Equivalence margin ±5 units
Expected difference 0 units
Standard deviation 10 units
TOST one-sided \(\alpha\) 0.05
Corresponding CI 90%
Target power 90%
Allocation 1:1
Evaluable N per group 69
Expected dropout 10%
Randomized N per group 77
Total randomized N 154

The Most Important Concept

The most important idea in equivalence-trial sample-size planning is that the study must be precise enough to rule out clinically important differences.

The calculation therefore depends heavily on the relationship between:

  • The equivalence margin
  • The expected treatment difference
  • The variability of the endpoint
  • The desired power
  • The sample size

For a continuous endpoint with a symmetric margin and expected difference of zero, the central relationship is:

\[ n = \frac{ 2\sigma^2 \left( z_{1-\alpha}+z_{1-\beta} \right)^2 }{ M^2 } \]

This immediately shows why:

  • Higher variability requires more patients.
  • Higher power requires more patients.
  • A narrower equivalence margin requires substantially more patients.
  • A treatment difference closer to an equivalence boundary requires more patients.
  • Dropout requires additional randomized patients.
Bottom line: An equivalence trial is not designed to show that two treatments are statistically indistinguishable. It is designed to demonstrate that the difference between them is sufficiently small to fall within a prespecified clinical equivalence region. Sample size is driven primarily by the desired precision: the narrower the equivalence margin and the greater the endpoint variability, the more patients are required. The two one-sided tests procedure provides the standard hypothesis-testing framework, with equivalence corresponding to a confidence interval that lies completely within the equivalence margins.

References

Schuirmann, D.J. (1987). A comparison of the two one-sided tests procedure and the power approach for assessing the equivalence of average bioavailability. Journal of Pharmacokinetics and Biopharmaceutics, 15, 657–680.

Westlake, W.J. (1976). Symmetrical confidence intervals for bioequivalence trials. Biometrics, 32, 741–744.

Chow, S.-C., Shao, J. & Wang, H. Sample Size Calculations in Clinical Research. Chapman & Hall/CRC.

Chow, S.-C. & Liu, J.-P. Design and Analysis of Bioavailability and Bioequivalence Studies. Marcel Dekker.

Blackwelder, W.C. (1982). Proving the null hypothesis in clinical trials. Controlled Clinical Trials, 3, 345–353.

Diletti, E., Hauschke, D. & Steinijans, V.W. (1991). Sample size determination for bioequivalence assessment by means of confidence intervals. International Journal of Clinical Pharmacology, Therapy and Toxicology.

Hauschke, D., Pigeot, I. & Tamhane, A.C. Statistical Principles for Clinical Trials. Wiley.