Tutorials › Bioavailability and Bioequivalence › Sensitivity of Sample Size to Within-Subject Variability

Sample Size and Power · Tutorial 129 of 399

Sensitivity of Sample Size to Within-Subject Variability

Learn to construct and interpret a sample-size sensitivity curve for average bioequivalence as within-subject variability changes.

Advanced 11 min read

What You'll Learn

  • Convert within-subject coefficient of variation to log-scale variance for sample-size planning.
  • Explain how within-subject variance affects approximate average bioequivalence sample size.
  • Construct and interpret a sensitivity curve across plausible variability values.
  • Assess how a noncentral expected test-to-reference ratio changes the sensitivity calculation.
  • Distinguish a continuous approximation from exact power and operational sample-size choices.
  • Identify assumptions and planning risks that can make a sensitivity curve misleading.

Why Vary Within-Subject Variability?

A sample-size calculation is conditional on its inputs. In a crossover average bioequivalence study, the assumed within-subject variability is especially influential: it determines the variance of the test-versus-reference contrast and therefore the precision available from a given number of participants. A sensitivity analysis asks how the planned sample size changes over a plausible range of that variability, rather than treating one estimate as certain.

The aim here is not to estimate variability from study data. It is to quantify its planning consequence while holding the other assumptions fixed. The resulting curve can reveal whether a modest change in variability barely affects the plan or moves it across a meaningful recruitment threshold.

Definition: A sample-size sensitivity curve is a plot or table of the sample size required to meet a specified power target as one planning input varies and the remaining inputs are held fixed. Here, the varying input is the within-subject coefficient of variation (CV), and the outcome is the number of evaluable participants required for average bioequivalence.

From Within-Subject CV to Sample Size

For a two-period crossover, let \(D_i\) be participant \(i\)'s log-transformed test response minus their log-transformed reference response. Under the standard planning model, the \(D_i\) are independent and normally distributed with mean \(\theta\) and variance \(2\sigma_w^2\), where \(\theta\) is the expected log test-to-reference ratio and \(\sigma_w^2\) is the within-subject log-scale variance for one treatment. The factor of 2 arises because the within-subject contrast includes variability from both treatment measurements. This model assumes a common within-subject variance, no relevant carryover, and an appropriate crossover analysis.

A within-subject CV on the original scale is converted to the log scale using the standard lognormal relationship. In this tutorial, CV is entered as a proportion: for example, 30% is entered as 0.30. The equivalence limits on the log scale are \(L=\ln(0.80)\) and \(U=\ln(1.25)\), which are symmetric about zero.

$$ \sigma_w^2=\ln(1+CV^2), \qquad SE(\bar{D})=\sqrt{\frac{2\sigma_w^2}{n}}. $$

For a centered expected ratio, \(\theta=0\), a useful normal approximation to the required sample size is

$$ n_{\mathrm{approx}} \approx \frac{2\sigma_w^2\left(z_{1-\alpha}+z_{1-\beta}\right)^2}{\delta^2}, \qquad \delta=\ln(1.25), $$

where \(1-\beta\) is the target power and \(z_q\) is the \(q\) quantile of the standard normal distribution. This approximation treats the two one-sided tests (TOST) as being governed by the nearer equivalence boundary and uses a normal critical value. It is a planning approximation, not a substitute for exact power based on the noncentral \(t\) distribution.

Why the Curve Rises with Variability

Holding the target power, significance level, and expected ratio fixed, the centered approximation has the form \(n_{\mathrm{approx}}=K\ln(1+CV^2)\), where \(K\) is a positive constant. Therefore, increasing CV increases the log-scale variance and the required sample size. The relationship is not exactly proportional to CV: the variance depends on \(\ln(1+CV^2)\), not on CV itself.

A short derivative makes the local sensitivity explicit. Differentiating with respect to CV gives

$$ \frac{d n_{\mathrm{approx}}}{dCV} = K\frac{2CV}{1+CV^2}. $$

Thus the slope depends on both the variance conversion and the planning constant. For values below 1, the second derivative is \(2K(1-CV^2)/(1+CV^2)^2\), which is positive: the continuous approximation is convex over that range. In practical terms, equal absolute increases in CV can have increasingly large sample-size consequences over typical CV values. The operational sample-size curve, however, may look like steps because sample size must be an integer and designs may require balanced sequence allocation.

Worked Example: Converting a CV Into Log-Scale Variance

Suppose a hypothetical two-period crossover study is planned with a within-subject CV of 30%. Convert the CV to the log-scale variance and the standard deviation of the within-subject contrast.

Enter the CV as 0.30. The within-subject log-scale variance is

$$ \sigma_w^2=\ln(1+0.30^2)=\ln(1.09)=0.0861777. $$

The log-scale standard deviation for one treatment is \(\sqrt{0.0861777}=0.293560\). The contrast \(D_i\) has variance \(2\sigma_w^2=0.172355\) and standard deviation \(\sqrt{0.172355}=0.415156\). These values describe variability on the log scale; they are not percentages. The contrast standard error for a given \(n\) is \(0.415156/\sqrt{n}\).

Building a Sensitivity Curve

Consider a hypothetical planning scenario with two one-sided tests at \(\alpha=0.05\), 80% target power, the standard 80.00% to 125.00% limits, and an expected test-to-reference ratio of 1.00. The log-scale limits are \(-\delta\) and \(+\delta\), with \(\delta=\ln(1.25)=0.223144\). The normal quantiles are \(z_{0.95}=1.64485\) and \(z_{0.80}=0.841621\). Substitution gives

$$ K= \frac{2(1.64485+0.841621)^2}{(0.223144)^2} \approx 248.33, \qquad n_{\mathrm{approx}}\approx248.33\ln(1+CV^2). $$

The following table evaluates this same formula at several CV values. Its sample sizes are continuous normal-approximation results; the final column shows an operational rounding illustration, rounding upward to an even number for balanced sequences. Neither column is an exact-power guarantee.

Within-subject CV\(\ln(1+CV^2)\)\(n_{\mathrm{approx}}\)Rounded up to an even number
20%0.03922079.74010
25%0.060624615.0516
30%0.086177721.4022
35%0.11555828.7030
40%0.14842036.8638

For example, at 30% CV, \(248.33(0.0861777)=21.401\), or about 21.40 evaluable participants under this approximation. The rounded value of 22 is an illustration of integer and sequence balancing, not evidence that exact power is at least 80%. A final plan should use the exact TOST power calculation and should also distinguish evaluable participants from the number to recruit.

Worked Example: Comparing Two Points on the Curve

Using the hypothetical scenario above, compare the approximate sample sizes at 25% and 35% within-subject CV. Show how much the change in variability shifts the plan.

At 25% CV, the log-scale variance is \(\ln(1+0.25^2)=\ln(1.0625)=0.0606246\). Therefore,

$$ n_{\mathrm{approx}}=248.33(0.0606246)=15.0549 \approx 15.05. $$

At 35% CV, the variance is \(\ln(1+0.35^2)=\ln(1.1225)=0.115558\), giving

$$ n_{\mathrm{approx}}=248.33(0.115558)=28.697 \approx 28.70. $$

The continuous approximation increases by about \(28.70-15.05=13.65\) participants, or roughly 91% relative to the 25% result. This is a large planning effect, even though CV increased by 10 percentage points. If the design requires an even number for balanced sequences, the illustrative rounded counts would be 16 and 30. Exact power could change either required count, so the rounded approximations should not be reported as final sample sizes.

When the Expected Ratio Is Not Centered

The preceding curve assumes the expected log ratio is zero. If the expected ratio is not 1.00, the expected effect is closer to one equivalence boundary than the other, and the sample size generally rises. A useful approximation identifies the distance from the expected log ratio to its nearest boundary:

$$ d=\min(\theta-L,\ U-\theta), \qquad n_{\mathrm{approx}} \approx \frac{2\sigma_w^2(z_{1-\alpha}+z_{1-\beta})^2}{d^2}. $$

This approximation assumes that rejection at the nearer boundary governs power and that the other one-sided test is unlikely to be limiting. When the expected ratio is far from the center, exact joint TOST power is preferable because the two rejection conditions must both hold.

Worked Example: A Sensitivity Calculation with a 0.95 Expected Ratio

For illustration, retain \(\alpha=0.05\), 80% target power, 30% CV, and the 80.00% to 125.00% limits, but suppose the expected test-to-reference ratio is 0.95. Calculate the approximate sample size using the nearer-boundary approximation.

The expected log ratio is \(\theta=\ln(0.95)=-0.0512933\). The distances to the lower and upper limits are

$$ \theta-L=-0.0512933-\ln(0.80)=0.171850, \qquad U-\theta=\ln(1.25)-(-0.0512933)=0.274437. $$

The nearer distance is \(d=0.171850\). With \(\sigma_w^2=\ln(1.09)=0.0861777\),

$$ n_{\mathrm{approx}} \approx \frac{2(0.0861777)(1.64485+0.841621)^2}{(0.171850)^2} \approx36.09. $$

This approximation is higher than the centered result of about 21.40 because the expected ratio is closer to the lower equivalence boundary. It is a sensitivity illustration, not an exact TOST sample size: the joint probability of passing both tests should be evaluated before selecting the final number.

Assumptions, Diagnostics, and Alternatives

A sensitivity curve is interpretable only if the planning model and inputs are credible. The model above assumes independent participant contrasts, a common within-subject variance, normally distributed log-scale contrasts, and the stated two-period crossover structure. The CV must correspond to the same endpoint and population as the planned study. A CV drawn from a different assay, formulation, endpoint, or population may not be an appropriate planning input.

When exact power is calculated, both TOST conditions must be met. For \(n\) evaluable participants, let \(\bar{D}\) and \(S_D\) be the sample mean and standard deviation of the log contrasts. The usual confidence-interval criterion is that the \(100(1-2\alpha)\%\) confidence interval for \(\theta\) lies entirely inside \([L,U]\). Under the normal model, its half-width is \(t_{1-\alpha,n-1}S_D/\sqrt{n}\); exact power accounts for the random estimate of the mean and the random sample standard deviation. The approximation replaces this calculation with normal quantiles and a simplified limiting-boundary calculation.

Before relying on a curve, check that it behaves as expected: increasing CV should not reduce required sample size when other inputs are fixed. Recalculate a few points independently, verify that CV was entered as a proportion, and check that the variance transformation is \(\ln(1+CV^2)\). Compare the exact-power result at selected points with the approximation, especially where the planned count is small or the expected ratio is off center. A sharp jump in an integer sample-size table may reflect rounding or sequence balance rather than a sudden change in the underlying continuous requirement.

The main alternative is to calculate exact TOST power at each candidate sample size and CV, then find the smallest \(n\) meeting the target. This is generally more appropriate for the final plan. The normal approximation is quicker and useful for explaining the shape and relative sensitivity of the curve. Neither approach resolves uncertainty about the true CV by itself: a single curve shows conditional sample sizes, not the probability that the selected sample size will attain its target power. Variance uncertainty and design choices require separate planning consideration.

Common Pitfall and Practical Use

A frequent mistake is to say that sample size is directly proportional to CV. Under the centered approximation, it is proportional to \(\ln(1+CV^2)\). For small CV, this is approximately \(CV^2\), since \(\ln(1+CV^2)\approx CV^2\); this explains why small relative changes can have a substantial effect. But the exact conversion is nonlinear, and the approximation involving \(CV^2\) should not replace the log transformation in a calculation.

Another mistake is to treat the approximate result, after rounding, as a guaranteed design. The formula is useful for sensitivity and initial planning, but exact power, sequence allocation, and the distinction between evaluable and recruited participants matter in implementation. The sensitivity curve is most useful when it is presented with its assumptions and a plausible CV range, so decision-makers can see how fragile the plan is to variability misspecification.

Key takeaway: For a fixed centered average bioequivalence scenario, the approximate required sample size increases with \(\ln(1+CV^2)\). A useful sensitivity analysis varies CV while keeping the other assumptions explicit, then uses exact TOST power to verify the final design.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For a within-subject CV of 20%, calculate \(\sigma_w^2\). Why should 20 be entered as 0.20?
  2. In the centered hypothetical scenario with \(K=248.33\), calculate the approximate sample size at 25% CV and explain what the result does and does not establish.
  3. Why does an expected ratio of 0.95 increase the approximate sample size relative to an expected ratio of 1.00?
  4. Name two reasons why a sensitivity curve might not be an adequate final sample-size justification.

Solutions. (1) \(\sigma_w^2=\ln(1+0.20^2)=\ln(1.04)=0.0392207\). CV is a proportion in the variance formula, so 20% is represented by 0.20. (2) \(n_{\mathrm{approx}}=248.33(0.0606246)=15.0549\approx15.05\), using \(\ln(1+0.25^2)=0.0606246\). This is a continuous normal-approximation result, not an exact-power guarantee or a final recruitment number. (3) The expected log ratio \(\ln(0.95)\) is closer to the lower equivalence boundary than zero is, reducing the distance to the limiting boundary and increasing the required precision. (4) For example, the curve may rely on an uncertain or inapplicable CV, and the approximation may differ from exact TOST power; it also does not by itself account for nonevaluable participants or other design constraints.