From a Power Target to a Sample Size
A planned comparison is useful only if the study can detect an effect of practical interest with adequate probability. In a multivariate study, that probability depends not just on the size of the mean difference, but also on how the outcomes vary together, how many comparisons are planned, and how observations are divided among groups. Sample-size planning makes those dependencies explicit before data collection.
The central planning quantity is the noncentrality parameter of the test statistic under a specified alternative. For Gaussian data with known covariance matrices, it can be calculated from the contrast effect and its sampling covariance. When covariances are estimated, the resulting test may instead require a finite-sample approximation or a simulation-based power calculation; the known-covariance calculation is then a planning benchmark, not an automatic exact answer.
Contrasts, Covariance, and Power
Suppose group \(g\) contributes \(n_g\) independent observations, and observations in that group have covariance \(\Sigma_g\). Write \(\bar X_g\) for its sample mean vector and \(\widehat D=\sum_g A_g^\mathsf{T}\bar X_g\) for the estimated contrast. Independence between groups gives the contrast covariance \(V=\sum_g A_g^\mathsf{T}\Sigma_g A_g/n_g\). If the covariance matrices are known and observations are multivariate normal, then \(\widehat D\) is normal with mean \(\delta\) under the alternative. The Wald statistic \(W=\widehat D^\mathsf{T}V^{-1}\widehat D\) has a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality parameter \(\lambda=\delta^\mathsf{T}V^{-1}\delta\), provided \(V\) is positive definite.
For a family of \(M\) planned tests with familywise error target \(\alpha\), a simple choice is the Bonferroni level \(\alpha_*=\alpha/M\) for each test. For an \(r\)-dimensional Wald test, its critical value is \(c=\chi^2_{r,1-\alpha_*}\), the \(1-\alpha_*\) quantile of the central chi-square distribution. Its power at a specified alternative is \(P\{\chi^2_r(\lambda)>c\}\). A proposed sample size meets a per-contrast target when this power is at least the chosen target for every contrast of interest. If the goal is instead a probability of at least \(1-\beta\) that all \(M\) specified effects are detected, it is sufficient to require each contrast’s miss probability to be at most \(\beta/M\); the union bound then limits the probability of any miss to \(\beta\). These are different planning targets and should not be confused.
Worked Example: Planning Equal Group Sizes for a Two-Outcome Contrast
Two independent groups are compared on \(p=2\) outcomes, with planned contrast \(D=\mu_2-\mu_1\). Assume both groups have known covariance \(\Sigma=I_2\), and plan for an effect \(\delta=(1,0)^\mathsf{T}\). There are \(M=2\) planned contrasts in the family, the familywise level is \(\alpha=0.05\), and the target is at least 80% power for this contrast.
With \(n\) observations in each group, the contrast covariance is \(V=I_2/n+I_2/n=2I_2/n\). Therefore \(\lambda=\delta^\mathsf{T}V^{-1}\delta=n/2\), since \(V^{-1}=nI_2/2\) and \(\delta^\mathsf{T}\delta=1\). Bonferroni gives \(\alpha_*=0.025\), so the two-degree-of-freedom critical value is approximately \(c=7.378\).
As a transparent rough calculation, approximate the noncentral chi-square distribution by a normal distribution with mean \(r+\lambda\) and variance \(2(r+2\lambda)\). At \(n=24\), \(\lambda=12\), and the resulting approximate power is \(\Phi\{(14-7.378)/\sqrt{2(2+2\cdot12)}\}=\Phi(6.622/\sqrt{52})=\Phi(0.918)\approx0.82\). Thus 24 per group meets the 80% target under this approximation. For an actual design, evaluate the noncentral chi-square tail directly and, when the final procedure estimates covariance, verify power for that procedure as well.
How Allocation Changes the Noncentrality
For a two-group difference \(D=\mu_2-\mu_1\), the contrast covariance is \(\Sigma_1/n_1+\Sigma_2/n_2\). Holding the total sample size fixed does not generally hold power fixed: changing \(n_1\) and \(n_2\) changes this covariance, and therefore changes \(\lambda\). If the groups have the same covariance, balance minimizes the variance of the difference for a fixed total. Under unequal covariances, an unequal allocation can be more efficient.
Worked Example: Comparing Two Allocations for a Different Planned Effect
Consider a different two-outcome contrast, again \(D=\mu_2-\mu_1\), with common known covariance \(I_2\), but now with planned effect \(\delta=(\sqrt{0.8},0)^\mathsf{T}\). Its squared standardized effect is \(\delta^\mathsf{T}I_2^{-1}\delta=0.8\). Let the total sample size be 60, and use the same \(M=2\), \(\alpha=0.05\), \(r=2\) settings, so \(c=7.378\).
With equal allocation, \(n_1=n_2=30\), the covariance is \((1/30+1/30)I_2=I_2/15\). Thus \(\lambda=0.8/(1/15)=12\). The normal approximation gives \(\Phi\{(14-7.378)/\sqrt{2(2+2\cdot12)}\}=\Phi(6.622/\sqrt{52})=\Phi(0.918)\approx0.82\).
With allocation \(n_1=40,n_2=20\), the covariance is \((1/40+1/20)I_2=0.075I_2\), so \(\lambda=0.8/0.075=10.6667\). The approximate power is \(\Phi\{(2+10.6667-7.378)/\sqrt{2(2+2\cdot10.6667)}\}=\Phi(5.2887/\sqrt{46.6667})=\Phi(0.774)\approx0.78\). The balanced allocation is better here. This effect vector is explicitly different from the one in the preceding example; its squared standardized effect is 0.8, not 1.
To verify the covariance formula, center each group sample mean at its population mean. Independence across groups makes all cross-covariance terms between distinct group means zero. For each group, \(\operatorname{Cov}(\bar X_g)=\Sigma_g/n_g\). Therefore \[ \operatorname{Cov}(\widehat D) =\sum_g A_g^\mathsf{T}\operatorname{Cov}(\bar X_g)A_g =\sum_g A_g^\mathsf{T}\frac{\Sigma_g}{n_g}A_g =V. \] Under multivariate normal sampling, a fixed linear transformation of the independent sample means is multivariate normal. Thus \(\widehat D\sim N_r(\delta,V)\) under the alternative. If \(Z=V^{-1/2}\widehat D\), then \(Z\sim N_r(V^{-1/2}\delta,I_r)\) and \(W=Z^\mathsf{T}Z\). The squared norm of a normal vector with identity covariance and mean \(V^{-1/2}\delta\) has a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality \(\|V^{-1/2}\delta\|^2=\delta^\mathsf{T}V^{-1}\delta\). This establishes both claims. \(\square\)
A Useful Allocation Result
For two groups with covariance matrices \(\Sigma_1=aI_p\) and \(\Sigma_2=bI_p\), where \(a,b>0\), the covariance of a difference is \((a/n_1+b/n_2)I_p\). For any fixed nonzero effect vector, maximizing its noncentrality at a fixed total \(N=n_1+n_2\) is equivalent to minimizing \(a/n_1+b/n_2\).
For every positive \(n_1,n_2\), the Cauchy–Schwarz inequality gives \[ \left(\frac{a}{n_1}+\frac{b}{n_2}\right)(n_1+n_2) \geq (\sqrt a+\sqrt b)^2. \] Equality holds precisely when the two vectors \((\sqrt{a/n_1},\sqrt{b/n_2})\) and \((\sqrt{n_1},\sqrt{n_2})\) are proportional, which requires \(a/n_1^2=b/n_2^2\), or \(n_1/n_2=\sqrt{a/b}\). Since the right-hand side is fixed when \(N\) is fixed, this allocation minimizes the variance factor and maximizes the noncentrality. \(\square\)
Worked Example: Allocating More Participants to the More Variable Group
Suppose a two-outcome difference has known covariances \(\Sigma_1=I_2\) and \(\Sigma_2=4I_2\), with planned effect \(\delta=(1,0)^\mathsf{T}\) and total sample size \(N=60\). There are \(M=2\) planned comparisons, so the Bonferroni critical value for this two-dimensional test at familywise \(\alpha=0.05\) is again \(7.378\).
Equal allocation gives \(n_1=n_2=30\), so \(V=(1/30+4/30)I_2=I_2/6\) and \(\lambda=6\). The result above gives the allocation ratio \(n_1:n_2=\sqrt1:\sqrt4=1:2\). With \(n_1=20,n_2=40\), \(V=(1/20+4/40)I_2=0.15I_2\) and \(\lambda=1/0.15=20/3\approx6.6667\). The unequal allocation increases noncentrality because more observations are assigned to the group with the larger covariance. It is not a universal rule to oversample the more variable group: the optimal ratio follows from the covariance structure and the specific design constraints.
A Practical Planning Workflow
Write each planned contrast with coefficients summing to zero across groups, and state its dimension and the family of tests it belongs to.
Choose effect vectors with practical meaning and covariance matrices supported by prior data or a pilot study. Examine plausible alternatives if these inputs are uncertain.
Specify the familywise error procedure and whether the goal is power for every contrast, a probability of detecting all effects, or another clearly defined criterion.
For each candidate integer allocation, calculate \(V\), evaluate each relevant noncentrality and power, and retain allocations that meet the target.
If the final test estimates covariance or uses a small-sample approximation, assess power for that procedure, often by simulation under the proposed design.
Common Pitfall: Planning From the Effect Alone
A common mistake is to treat a multivariate effect size as if it determined sample size by itself. The same effect vector can have different power under different covariance matrices, group allocations, contrast dimensions, and multiplicity adjustments. For example, changing the covariance of one group changes \(V\), even if \(\delta\) and total \(N\) stay fixed. Likewise, using the unadjusted critical value for each member of a family does not meet the stated familywise error target.
Another mistake is to present a noncentral chi-square calculation based on known covariance as exact power for a test that estimates covariance from the data. The distribution and degrees of freedom of the actual statistic matter. Use the known-covariance result to understand the design and obtain a first calculation; then match the power calculation to the planned inferential procedure. For complicated covariance patterns or dependent contrasts, simulation can directly estimate the probability of the specified rejection event.
Check Your Understanding
Use the definitions and results above to work through these planning questions.
- Why must the group coefficients of each planned contrast sum to zero? Give a two-group coefficient choice that would fail this condition.
- For independent groups, explain why the covariance of a contrast adds the group contributions \(A_g^\mathsf{T}\Sigma_g A_g/n_g\).
- A family contains four planned tests with familywise level 0.05. What per-test level does the Bonferroni procedure use?
- In the proportional-covariance allocation result, how does the optimal ratio change when group 2 has nine times the covariance of group 1?
- Why should a calculation using known covariance matrices be checked when the final test estimates covariance?