Tutorials › Group Sequential Methods and Sample Size Re-Estimation › Correcting Pooled Variance For Allocation And Assumed Effect

Blinded Re-Estimation · Tutorial 366 of 699

Correcting Pooled Variance For Allocation And Assumed Effect

Learn to calculate and apply the finite-sample correction to a blinded pooled variance when allocation is unequal and the assumed treatment effect is nonzero.

Intermediate 9 min read

What You'll Learn

  • Calculate the treatment-effect contribution using the allocation fraction and prespecified effect.
  • Derive the expectation of the pooled sample variance for two groups with a common variance.
  • Apply the finite-sample corrected variance formula and distinguish it from its large-sample approximation.
  • Interpret how a mismatch between the assumed and actual effect changes the correction.
  • Identify negative estimates, allocation errors, and other warning signs.

Why Allocation Matters in a Blinded Variance Correction

When treatment labels are masked, the variance calculated across all observed outcomes can include both ordinary within-group variation and variation between the treatment and control means. The latter depends on the size of the treatment effect, but also on how participants are allocated. With unequal allocation, the effect contribution is not generally one quarter of the squared effect. A correction must use the allocation fraction as well as a prespecified effect magnitude.

This tutorial derives that contribution and gives its finite-sample correction. The calculation concerns a pooled sample variance across all outcomes, not the usual pooled within-group variance calculated after separating participants by treatment arm. The assumed effect is a planning input; it is not estimated from the masked pooled data.

Definition: Suppose \(n_1\) participants are assigned to treatment and \(n_0\) to control, with \(N=n_1+n_0\). Define the treatment allocation fraction \(q=n_1/N\), and let \(\delta=\mu_1-\mu_0\) be the difference between the treatment and control population means. Let \(S^2\) be the sample variance of all \(N\) outcomes about their overall sample mean, calculated with denominator \(N-1\). For a prespecified effect magnitude \(\Delta_0\), the finite-sample corrected variance estimate is $$ \hat{\sigma}^2_{\mathrm{corr}} = \frac{(N-1)S^2-Nq(1-q)\Delta_0^2}{N-1}. $$

The allocation factor \(q(1-q)\) is largest at \(q=1/2\), and it decreases as allocation becomes more imbalanced. For example, if the treatment-to-control allocation ratio is \(1:2\), then \(q=1/3\) and \(q(1-q)=2/9\), rather than \(1/4\). The factor \(Nq(1-q)\Delta_0^2\) is the prespecified treatment-effect contribution to the expected pooled sum of squares.

Model and Derivation

Assume fixed group sizes \(n_1\) and \(n_0\), independent outcomes, and a common within-group variance \(\sigma^2\). Specifically, each treatment outcome has mean \(\mu_1\), each control outcome has mean \(\mu_0\), and outcomes within both groups have variance \(\sigma^2\). The two group means may differ. These assumptions describe a simple continuous-outcome setting; the derivation of the expectation below needs finite variances, not normality.

Write \(\bar{Y}_1\) and \(\bar{Y}_0\) for the treatment and control sample means, and \(\bar{Y}\) for the overall mean. The total sum of squares about \(\bar{Y}\) splits into the within-group sum of squares and the between-group sum of squares:

$$ (N-1)S^2 = \sum_{i=1}^{n_1}(Y_{1i}-\bar{Y}_1)^2 + \sum_{i=1}^{n_0}(Y_{0i}-\bar{Y}_0)^2 + \frac{n_1n_0}{N}(\bar{Y}_1-\bar{Y}_0)^2. $$

The expected within-group sum of squares is \((n_1-1)\sigma^2+(n_0-1)\sigma^2=(N-2)\sigma^2\). For the between-group term, independence gives \(E[(\bar{Y}_1-\bar{Y}_0)^2]=\delta^2+\sigma^2(1/n_1+1/n_0)\). Multiplying by \(n_1n_0/N\) yields a treatment-effect component and one additional variance component:

$$ \frac{n_1n_0}{N} E[(\bar{Y}_1-\bar{Y}_0)^2] = \frac{n_1n_0}{N}\delta^2+\sigma^2 = Nq(1-q)\delta^2+\sigma^2. $$

The additional variance component is \(\sigma^2\), not \(2\sigma^2\): the between-group sum of squares has one degree of freedom after estimating the overall mean. Adding the expected within- and between-group terms gives

$$ E[(N-1)S^2]=(N-1)\sigma^2+Nq(1-q)\delta^2, \qquad E(S^2)=\sigma^2+\frac{N}{N-1}q(1-q)\delta^2. $$

To remove the contribution associated with the prespecified effect, subtract \(Nq(1-q)\Delta_0^2\) from the observed pooled sum of squares, then divide by its \(N-1\) scale. This gives the definition above. Taking its expectation also shows exactly what happens if the assumed magnitude does not equal the actual magnitude:

$$ E(\hat{\sigma}^2_{\mathrm{corr}}) = \sigma^2+ \frac{N}{N-1}q(1-q)(\delta^2-\Delta_0^2). $$

Thus the moment correction targets \(\sigma^2\) when \(\Delta_0^2=\delta^2\). If the assumed magnitude is too small, the corrected estimate retains some positive treatment-effect contribution on average. If it is too large, the correction tends downward on average. This is a statement about expectation under the model, not a guarantee about any one observed estimate.

Calculating the Correction

Worked Example: A One-to-Two Allocation

Suppose a hypothetical masked trial has 40 treatment participants and 80 control participants, so \(N=120\) and \(q=40/120=1/3\). The pooled sample variance across all outcomes is \(S^2=100\ \text{mmHg}^2\). The prespecified treatment-effect magnitude is \(\Delta_0=4\ \text{mmHg}\). Calculate the corrected variance estimate.

First calculate the assumed effect contribution. Since \(q(1-q)=(1/3)(2/3)=2/9\),

$$ Nq(1-q)\Delta_0^2 = 120\left(\frac{2}{9}\right)(4^2) = 426.667\ \text{mmHg}^2. $$

The pooled sum of squares is \((N-1)S^2=119(100)=11{,}900\ \text{mmHg}^2\). Subtracting the contribution and dividing by \(N-1\) gives

$$ \hat{\sigma}^2_{\mathrm{corr}} = \frac{119(100)-426.667}{119} = \frac{11{,}473.333}{119} = 96.41\ \text{mmHg}^2. $$

The corresponding estimated standard deviation is \(\sqrt{96.41}=9.819\ \text{mmHg}\). The calculation uses the one-to-two allocation factor \(2/9\); substituting the equal-allocation factor \(1/4\) would subtract too much for this design.

Worked Example: Equal Allocation and a Larger Assumed Effect

In a hypothetical study, \(N=100\) participants are allocated equally, the masked pooled sample variance is \(64\ \text{units}^2\), and the prespecified effect magnitude is \(6\) outcome units. Here \(q=0.5\), so \(q(1-q)=0.25\). The contribution is \(100(0.25)(6^2)=900\ \text{units}^2\).

The corrected estimate is

$$ \hat{\sigma}^2_{\mathrm{corr}} = \frac{99(64)-900}{99} = \frac{6{,}336-900}{99} = \frac{5{,}436}{99} = 54.91\ \text{units}^2. $$

Its square root is approximately \(7.410\) outcome units. Equal allocation gives the largest value of \(q(1-q)\), so for the same total sample size and assumed effect magnitude it produces the largest subtracted treatment-effect contribution.

Worked Example: Unequal Allocation with a Different Prespecified Effect

Suppose a hypothetical masked trial has \(N=100\), with \(q=0.30\), a pooled sample variance of \(30.1\ \text{units}^2\), and a prespecified effect magnitude of \(4\) units. Then \(q(1-q)=0.30(0.70)=0.21\), and the effect contribution is \(100(0.21)(4^2)=336\ \text{units}^2\).

Using the finite-sample denominator \(N-1=99\),

$$ \hat{\sigma}^2_{\mathrm{corr}} = \frac{99(30.1)-336}{99} = \frac{2{,}979.9-336}{99} = \frac{2{,}643.9}{99} = 26.706\ \text{units}^2. $$

This estimate is lower than the uncorrected pooled variance because a positive effect contribution was subtracted. Whether it is close to the underlying within-group variance cannot be decided from this calculation alone; that depends in part on how well \(\Delta_0\) represents the actual effect magnitude.

Finite-Sample Form and Practical Interpretation

An algebraically equivalent expression makes the finite-sample adjustment especially clear:

$$ \hat{\sigma}^2_{\mathrm{corr}} = S^2-\frac{N}{N-1}q(1-q)\Delta_0^2. $$

For large \(N\), the multiplier \(N/(N-1)\) is close to 1, so the correction is sometimes approximated by \(S^2-q(1-q)\Delta_0^2\). The displayed finite-sample formula is the moment correction derived from the expectation of \(S^2\). Do not use the approximation when the requested calculation calls for the finite-sample correction.

The allocation fraction in the formula must correspond to the group sizes assumed by the model. With a fixed design ratio, it is usually the prespecified treatment fraction. If the actual masked group sizes differ from that ratio, using the design fraction is an approximation to the fixed-size derivation; the analyst should document the choice rather than silently treating the two as identical. The effect magnitude is squared, so the correction does not depend on whether the assumed treatment effect is positive or negative.

ApproachWhat it usesMain implication
Uncorrected pooled varianceAll outcomes and the overall meanIncludes any between-group mean contribution; under the model its expectation exceeds \(\sigma^2\) when \(\delta\ne 0\).
Prespecified-effect correctionAll outcomes, allocation fraction, and \(\Delta_0\)Removes the modeled contribution; accurate targeting depends on the assumed effect being appropriate.
Within-group variance estimateOutcomes separated by treatment groupEstimates common within-group variance without the between-mean contribution, but requires access to treatment labels.

Diagnostics, Limitations, and Common Mistakes

The formula is a model-based adjustment, not a way to recover a treatment-blind estimate of within-group variance without assumptions. Its usefulness depends on the common-variance model, correct treatment allocation information, and a defensible prespecified effect magnitude. If the assumed effect is uncertain, it is sensible to examine how the correction changes over a range of plausible magnitudes, rather than to present a single value as assumption-free.

A corrected estimate can be negative if the observed pooled variance is smaller than the subtracted contribution. Since a variance cannot be negative, a negative result is a warning that the specified contribution is too large relative to the observed pooled sum of squares, or that sampling variability or model mismatch is substantial. A practical procedure may impose a lower bound such as zero, but truncating changes the estimator and its expectation. The truncated value should be identified as a constrained operational choice, not reported as the unmodified moment estimate.

  • Using the wrong allocation factor. The factor is \(q(1-q)\), where \(q=n_1/N\), not automatically \(1/4\). The value \(1/4\) applies only to equal allocation.
  • Dividing by \(N\). The observed pooled sum of squares is \((N-1)S^2\), and the moment correction divides the adjusted sum by \(N-1\), not \(N\).
  • Subtracting an estimated effect from masked data. \(\Delta_0\) is prespecified. The pooled variance does not identify the treatment contrast, and this calculation does not estimate it.
  • Ignoring a negative result. Do not quietly change a negative estimate to a positive one. Report the value and explain any prespecified truncation rule.

A useful check is to set \(\Delta_0=0\). The formula then gives \(\hat{\sigma}^2_{\mathrm{corr}}=S^2\), as it should when no effect contribution is subtracted. Another check is that increasing \(\Delta_0^2\) decreases the corrected estimate, while moving \(q\) toward \(1/2\) increases the subtraction for a fixed \(N\) and \(\Delta_0\).

Key takeaway: Under fixed group sizes and a common within-group variance, the expected pooled sum of squares contains \(Nq(1-q)\delta^2\) from the treatment-effect difference. Subtracting its prespecified counterpart and dividing by \(N-1\) gives the finite-sample moment correction.

Check Your Understanding

Try each calculation or interpretation, then compare your reasoning with the solutions.

  1. A hypothetical study has \(N=100\), \(q=0.30\), and prespecified effect magnitude \(5\) units. What is the treatment-effect contribution to the pooled sum of squares?
  2. A hypothetical trial has \(N=80\), equal allocation, \(S^2=50\ \text{units}^2\), and \(\Delta_0=4\) units. Calculate the finite-sample corrected variance estimate.
  3. If the true effect magnitude is 3 units but \(\Delta_0=4\) units, with \(N=100\) and \(q=0.40\), what is the expectation of the corrected estimate relative to \(\sigma^2\)?
  4. Why is a negative corrected variance estimate a diagnostic rather than a meaningful estimate of a negative population variance?

Solutions. (1) \(100(0.30)(0.70)(5^2)=525\ \text{units}^2\). (2) The contribution is \(80(0.25)(16)=320\ \text{units}^2\), so \(\{79(50)-320\}/79=3{,}630/79=45.949\ \text{units}^2\). (3) The expected difference from \(\sigma^2\) is \(\frac{100}{99}(0.40)(0.60)(3^2-4^2)=-1.697\ \text{units}^2\); hence the corrected estimator has expectation \(\sigma^2-1.697\ \text{units}^2\). (4) Variance cannot be negative. The result signals that the subtracted contribution is too large for the observed pooled sum of squares, or that sampling variation or model assumptions warrant scrutiny; any truncation should be disclosed.

Clinical Biostats