Tutorials › Adaptive Clinical Trial Design › Internal Pilot Designs With Variance Re-Estimation

Sample Size Re-Estimation · Tutorial 315 of 799

Internal Pilot Designs With Variance Re-Estimation

Derive and apply an internal-pilot sample-size update based on the variance observed in accrued participants, while distinguishing a power target from a guarantee about the final analysis.

Advanced 12 min read

What You'll Learn

  • Define the internal-pilot variance estimate from accrued participants in both treatment arms.
  • Derive the equal-allocation sample-size formula for a continuous outcome.
  • Update the planned total using a prespecified variance-based rule.
  • Check assumptions and diagnose unstable or misleading variance estimates.
  • Distinguish a planning calculation from the validity of the final inferential procedure.
  • Compare internal-pilot re-estimation with fixed sizing and external-pilot planning.

Why Re-estimate Variance During the Trial?

For a continuous outcome, the sample size required to detect a specified treatment difference depends on the outcome variance. Before a trial begins, that variance is usually uncertain: it may be drawn from earlier studies, a small external pilot, or clinical judgment. If the actual variability is larger than anticipated, a fixed design may have less power than planned. An internal pilot uses outcomes from an initial group of trial participants to update the variance estimate and, if needed, the planned total sample size.

The defining feature is that the pilot participants remain part of the trial’s final analysis. The adaptation is a prespecified rule based on their accrued outcomes, not a separate study whose participants are discarded. This tutorial considers an unblinded internal pilot for a continuous outcome, with equal allocation and a common within-arm variance. It focuses on estimating variance and updating sample size; the calculation alone does not establish the validity of every possible final test or confidence interval.

Definition: An internal-pilot variance re-estimation design is a trial design in which a prespecified number of participants are enrolled in an initial stage, their outcome data are used to estimate a nuisance variance parameter, and a prespecified rule uses that estimate to revise the total sample size. The initial participants are retained in the final analysis.

Model and Variance Estimate

Suppose the primary outcome is measured once per participant, with larger values interpreted according to the trial’s outcome scale. For the planning calculation, assume independent participant outcomes, normal distributions in the two treatment arms, and a common variance \(\sigma^2\). Let the treatment means be \(\mu_1\) and \(\mu_0\), and let \(\delta>0\) be the treatment difference the design is intended to detect. Equal allocation means the planned total sample is twice the per-arm sample size.

At the internal-pilot review, suppose \(m\) participants have completed the outcome assessment in each arm. Write their sample means as \(\bar{x}_1\) and \(\bar{x}_0\), and their sample variances as \(s_1^2\) and \(s_0^2\). The unblinded pooled within-arm variance estimate is

$$ s_{\mathrm{pilot}}^2 = \frac{(m-1)s_1^2+(m-1)s_0^2}{2m-2} = \frac{\sum_{i=1}^{m}(X_{1i}-\bar{x}_1)^2+ \sum_{i=1}^{m}(X_{0i}-\bar{x}_0)^2}{2m-2}. $$

Each arm’s deviations are calculated around its own sample mean. Consequently, a difference between the treatment means is not counted as within-arm variability. Under independent normal outcomes with the same variance in both arms, this estimator is unbiased for \(\sigma^2\), and its degrees of freedom are \(df=2m-2\). This is an estimate of the variance, in squared outcome units; the estimated standard deviation is \(s_{\mathrm{pilot}}=\sqrt{s_{\mathrm{pilot}}^2}\).

The assumptions matter. If the treatment arms have materially different variances, a pooled estimate can obscure that difference. If outcome variability changes over calendar time, the initial participants may not represent later participants. Strong skewness or influential outliers can also make a small pilot variance unstable. These concerns should be examined using prespecified summaries and clinical knowledge, not resolved by choosing a convenient variance estimate after seeing the results.

Worked Example: Estimating the Pilot Variance

Hypothetical data. At a planned review, \(m=8\) participants in each arm have completed a continuous outcome measured in points. The sum of squared deviations around the treatment-arm mean is 252 points squared in arm 1 and 196 points squared in arm 0. Assume, for this calculation, independent normal outcomes and a common within-arm variance.

The pooled pilot variance is

$$ s_{\mathrm{pilot}}^2 = \frac{252+196}{2(8)-2} = \frac{448}{14} = 32.0\ \text{points}^2. $$

The corresponding estimated standard deviation is \(\sqrt{32.0}=5.657\) points. The estimate has \(14\) degrees of freedom because each of the two arm-specific sums of squares uses one degree of freedom to estimate its arm mean. This small pilot provides an estimate, not a precise determination of the population variance.

Deriving the Sample-Size Update

For a balanced two-arm comparison, if each arm has \(n\) participants and the common variance is \(\sigma^2\), the variance of the difference in sample means is \(2\sigma^2/n\). Under a normal-approximation planning calculation, a two-sided test at significance level \(\alpha\) has a standardized rejection threshold of approximately \(z_{1-\alpha/2}\) under the null. Under a target difference \(\delta\), the standardized mean is \(\delta\sqrt{n/(2\sigma^2)}\). Requiring approximate power \(1-\beta\) gives the familiar planning equation

$$ \frac{\delta\sqrt{n/(2\sigma^2)}-z_{1-\alpha/2}}{1} \approx z_{1-\beta}. $$

Rearranging first gives \(\delta\sqrt{n/(2\sigma^2)}\approx z_{1-\alpha/2}+z_{1-\beta}\). Squaring both sides and solving for \(n\) yields the required per-arm sample size. The internal-pilot rule substitutes the pilot variance estimate for the unknown \(\sigma^2\), then rounds up because a fraction of a participant cannot be enrolled.

$$ n_{\mathrm{req}} = \left\lceil \frac{2s_{\mathrm{pilot}}^2 \left(z_{1-\alpha/2}+z_{1-\beta}\right)^2}{\delta^2} \right\rceil. $$

This is a normal-approximation formula. For small samples or designs whose planned analysis uses a \(t\) statistic, a more accurate planning calculation can solve for sample size using the corresponding noncentral \(t\) distribution. The sample-size rule should match the trial’s specified primary analysis and planning convention; the approximation should not be treated as an exact power guarantee.

The update must also respect operational constraints. If \(m\) participants per arm have already accrued, the revised per-arm total should not be below \(m\). A minimum or maximum total may also be prespecified. Such bounds make the rule feasible, but a maximum below the calculated requirement means the target power is not achieved under the planning assumptions.

Prespecified update rule: Choose the review time, \(\alpha\), target power \(1-\beta\), clinically meaningful difference \(\delta\), sample-size formula, and any lower or upper bounds before reviewing the internal-pilot data. Calculate \(n_{\mathrm{req}}\) from the pilot variance, then apply the stated bounds and retain all pilot participants in the final total.

Worked Example: Updating the Per-Arm Total

Hypothetical design. A two-sided trial plans equal allocation, with \(\alpha=0.05\), target power \(0.80\), and a target difference of 5 points. At the review, the estimated common variance is \(49\ \text{points}^2\). The normal quantiles are \(z_{0.975}=1.960\) and \(z_{0.80}=0.8416\). Assume the normal-approximation formula is the prespecified planning method.

Substitute these values into the per-arm formula:

$$ n_{\mathrm{req}} = \left\lceil \frac{2(49)(1.960+0.8416)^2}{5^2} \right\rceil = \left\lceil \frac{98(2.8016)^2}{25} \right\rceil. $$

Since \((2.8016)^2=7.84896256\), the unrounded value is

$$ \frac{98(7.84896256)}{25} = 30.7679332352. $$

Therefore \(n_{\mathrm{req}}=\lceil30.77\rceil=31\) participants per arm, or 62 participants total. If, for example, 10 participants per arm had accrued at the review, the rule increases the target total to 31 per arm; it does not add 31 participants per arm on top of those already enrolled.

Applying Bounds and Interpreting the Result

A sample-size update is a decision rule, not just a formula. Before the review, the protocol should specify what happens if the estimate implies fewer participants than have already enrolled, or a total above the available cap. A simple bounded rule sets the final per-arm target to the calculated requirement subject to a floor and cap. The floor must preserve the accrued sample; the cap may limit feasibility but can reduce power below its target.

Worked Example: Enforcing a Prespecified Cap

Hypothetical design. At a review, 10 participants per arm have accrued. For a two-sided \(\alpha=0.05\) design targeting 80% power to detect a 4-point difference, the estimated variance is \(64\ \text{points}^2\). The protocol sets a maximum of 70 participants per arm. Assume the same normal-approximation planning method and quantiles as above.

The unbounded required number per arm is

$$ n_{\mathrm{req}} = \left\lceil \frac{2(64)(2.8016)^2}{4^2} \right\rceil = \left\lceil \frac{128(7.84896256)}{16} \right\rceil = \left\lceil62.79170048\right\rceil = 63. $$

The floor of 10 per arm does not change the requirement, and the cap of 70 per arm does not bind. The revised target is therefore 63 participants per arm, 126 total, including the 10 already accrued in each arm. If instead the cap were 60 per arm, the target would be capped at 60, but the design could no longer claim the calculated 80% target power under the stated assumptions.

Diagnostics, Alternatives, and Limitations

The internal-pilot estimate can be noisy, especially when few participants contribute to it. Under the common-variance normal model, the relative standard deviation of the sample variance is \(\sqrt{2/(2m-2)}\). For \(m=8\) per arm this is \(\sqrt{2/14}=0.378\), or about 37.8%. Thus, a marked change in the estimated variance is not surprising in a small pilot and should not automatically be interpreted as evidence that the initial planning value was wrong.

Useful diagnostics include checking the two arm-specific variances, examining outcome distributions and influential observations, confirming that the same outcome definition and measurement process were used, and reviewing whether accrual timing or participant characteristics could make later variability differ. A substantial difference between arm-specific variances challenges the common-variance assumption; a single extreme value may have a large impact on the estimate. These diagnostics do not justify discretionary changes to the prespecified rule. Any departure should be documented and assessed as a design change.

The main alternatives answer related but distinct planning questions. A fixed design uses a variance value chosen before enrollment and avoids a data-dependent sample-size update, but may be underpowered if that value is too small. An external pilot can inform the variance without using main-trial outcomes, but its participants may differ from the trial population or measurement conditions. An internal pilot uses directly relevant accrued outcomes and retains participants, but makes the final sample size depend on trial data.

That dependence is an important limitation. Substituting an estimated variance into a sample-size formula does not by itself prove that the final test has its nominal type I error rate or that a reported interval has its intended coverage. In particular, the final inferential procedure must be evaluated for the complete adaptive design, including the rule determining sample size. The planning calculation also does not guarantee the target power: it relies on the variance estimate, target difference, model assumptions, and chosen approximation.

Common pitfall: “The pilot variance is larger, so I will simply add the calculated number of participants to those already enrolled.” This confuses a required total with an additional sample. The formula gives a target per-arm total, so subtract the accrued participants only if calculating how many more to recruit. Another error is to treat the resulting nominal power as guaranteed; it is a planning target conditional on assumptions, not a certainty about the realized trial.

An internal pilot is most useful when the outcome variance is genuinely uncertain, the review occurs early enough to change recruitment, and the trial can accommodate the possible range of sample sizes. Its scientific value depends on more than the arithmetic: the review timing, variance estimator, target effect, bounds, and final analysis all need to be specified in a way that remains interpretable after the data-dependent update.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. With 12 completed participants per arm, how many degrees of freedom does the pooled within-arm variance estimate have under the stated model?
  2. Why are deviations calculated around separate arm means rather than around one overall mean?
  3. For \(s_{\mathrm{pilot}}^2=64\ \text{points}^2\), \(\delta=4\) points, and the quantile sum \(2.8016\), calculate the required per-arm total using the normal-approximation formula.
  4. If 15 participants per arm have accrued but the rule calculates a target of 12 per arm, what should the final total do?
  5. Does meeting the sample-size target calculated from the pilot variance prove that the final test has type I error \(\alpha\)? Explain briefly.

Solutions. (1) \(df=2(12)-2=22\). (2) Each arm’s variance describes within-arm spread; centering separately prevents the difference between treatment means from being counted as within-arm variability. (3) \(n=\left\lceil2(64)(2.8016)^2/4^2\right\rceil=\lceil62.79170048\rceil=\lceil62.79\rceil=63\) participants per arm. (4) The final target cannot be below the accrued total: retain all 15 per arm and apply the prespecified floor rule. (5) No. The final inferential procedure must be assessed under the complete adaptive design; the sample-size calculation alone does not establish its error rate.

Clinical Biostats