Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › Covariance Between Arm-to-Arm Contrasts

Shared-Control Correlation · Tutorial 90 of 499

Covariance Between Arm-to-Arm Contrasts

You will calculate covariances between pairwise arm contrasts, including cases where a shared arm contributes with the same or opposite signs.

Advanced 10 min read

What You'll Learn

  • State the independence and variance assumptions needed for arm-to-arm covariance calculations.
  • Calculate covariance between two treatment-control contrasts sharing a control group.
  • Calculate covariance between treatment-control and treatment-treatment contrasts.
  • Account for whether a shared arm mean enters both contrasts with the same or opposite signs.
  • Use arm-level variances to check covariance calculations and interpret their units.

Why the Pair of Arms Matters

A contrast compares two arm means, so its uncertainty depends on the uncertainty in both means. When two contrasts include the same arm, their estimates can vary together even if the individual observations in different arms are independent. To calculate that covariance correctly, identify the shared arm and the sign with which its mean enters each contrast.

This tutorial focuses on contrasts formed from differences between two arm means. It includes treatment-control contrasts and treatment-treatment contrasts. The result is a covariance in squared outcome units; it is not itself a correlation, which is unitless and also depends on the two contrast variances.

Model and Notation

Let arm \(g\) contain \(n_g\) observations \(Y_{g1},\ldots,Y_{gn_g}\), with mean \(\mu_g\) and variance \(\sigma_g^2\). Assume observations are independent within and between arms, and that observations within arm \(g\) have the same mean and variance. The arm sample mean is \(\bar{x}_g\), and its variance is \(\operatorname{Var}(\bar{x}_g)=\sigma_g^2/n_g\). Write \(v_g=\sigma_g^2/n_g\) for this variance. Normality is not required for these covariance results; finite variances and the stated independence are sufficient.

For a control arm labelled 0 and treatment arms labelled 1, 2, and so on, define a treatment-control contrast as \(C_i=\bar{x}_i-\bar{x}_0\). Define a treatment-treatment contrast as \(T_{ij}=\bar{x}_i-\bar{x}_j\). A minus sign is part of the definition: reversing the order of the arms reverses the contrast.

Definition: A covariance between two contrasts measures how their estimation errors vary together. For this independent-arm model, an arm mean contributes to the covariance only if it appears in both contrasts. Its contribution is positive when its coefficients have the same sign and negative when they have opposite signs. The contribution’s magnitude is the variance \(v_g\) of that arm mean.

Deriving the Pairwise Rules

The basic calculation follows from expanding the contrasts and using independence. For distinct treatment arms \(i\) and \(j\), both \(C_i\) and \(C_j\) contain the same control mean with coefficient \(-1\). All other arm means in these two contrasts are independent of one another and of the control mean. Consequently, only the control term remains:

$$ \begin{aligned} \operatorname{Cov}(C_i,C_j) &=\operatorname{Cov}(\bar{x}_i-\bar{x}_0,\bar{x}_j-\bar{x}_0)\\ &=\operatorname{Cov}(\bar{x}_i,\bar{x}_j) -\operatorname{Cov}(\bar{x}_i,\bar{x}_0) -\operatorname{Cov}(\bar{x}_0,\bar{x}_j) +\operatorname{Var}(\bar{x}_0)\\ &=v_0,\qquad i\ne j. \end{aligned} $$

The plus sign in the last line comes from multiplying the two control coefficients, \((-1)(-1)=1\). The control means are the same random quantity, not two independent copies. This is why the covariance is \(v_0\), rather than zero.

For a treatment-control contrast and a treatment-treatment contrast, consider \(C_i\) and \(T_{jk}\), where \(j\ne k\). If \(i=j\), the shared treatment mean has coefficient \(+1\) in both contrasts, giving covariance \(v_i\). If \(i=k\), that treatment mean has coefficients \(+1\) and \(-1\), giving covariance \(-v_i\). If \(i\) is neither \(j\) nor \(k\), the contrasts have no arm mean in common, so their covariance is zero under the model. For two treatment-treatment contrasts, the same reasoning applies to any arm they share: same-sign coefficients give a positive contribution, opposite-sign coefficients a negative one. If they share no arm, their covariance is zero.

These rules are consequences of the model, not a general guarantee that unrelated-looking estimates are independent in every study. Shared participants, clustering, or other dependence between arms would invalidate the assumption that distinct arm means have zero covariance.

Worked Pairwise Calculations

Worked Example: Two Treatment-Control Contrasts

Suppose a hypothetical study has one control arm and two treatment arms. The outcome is measured in points, and the observation variance in every arm is \(100\) points squared. Let \(n_0=40\), \(n_1=30\), and \(n_2=20\). Calculate the covariance between \(C_1=\bar{x}_1-\bar{x}_0\) and \(C_2=\bar{x}_2-\bar{x}_0\).

The arm-mean variances are \(v_0=100/40=2.5\), \(v_1=100/30=3.333\), and \(v_2=100/20=5\), each in points squared. The two contrasts share the control mean, with coefficient \(-1\) in both, so

$$ \operatorname{Cov}(C_1,C_2)=(-1)(-1)v_0=2.5\ \text{points}^2. $$

As a check, their variances are \(\operatorname{Var}(C_1)=v_1+v_0=5.833\) points squared and \(\operatorname{Var}(C_2)=v_2+v_0=7.5\) points squared. Thus their correlation is \(2.5/\sqrt{5.833(7.5)}\approx0.378\), a unitless value. The covariance is positive because both contrasts move in the same direction when the observed control mean changes.

Worked Example: A Treatment-Control Contrast and a Treatment-Treatment Contrast

Consider three hypothetical independent arms with observation variances \(\sigma_0^2=64\), \(\sigma_1^2=100\), and \(\sigma_2^2=144\) points squared, and sample sizes \(n_0=25\), \(n_1=25\), and \(n_2=20\). Calculate the covariances of \(C_1=\bar{x}_1-\bar{x}_0\) with \(T_{12}=\bar{x}_1-\bar{x}_2\), and of \(C_2=\bar{x}_2-\bar{x}_0\) with \(T_{12}\).

The mean variances are \(v_0=64/25=2.56\), \(v_1=100/25=4\), and \(v_2=144/20=7.2\) points squared. In the first pair, \(\bar{x}_1\) appears with coefficient \(+1\) in both contrasts. Therefore,

$$ \operatorname{Cov}(C_1,T_{12})=(+1)(+1)v_1=4\ \text{points}^2. $$

In the second pair, the shared mean is \(\bar{x}_2\). Its coefficient is \(+1\) in \(C_2\), but \(-1\) in \(T_{12}\), so

$$ \operatorname{Cov}(C_2,T_{12})=(+1)(-1)v_2=-7.2\ \text{points}^2. $$

The different signs are not a contradiction: the shared arm enters the two pairs in opposite ways. The magnitudes differ because the shared arm means have different variances.

Worked Example: Several Contrasts at Once

Suppose hypothetical independent arms have arm-mean variances \(v_0=2\), \(v_1=3\), \(v_2=4\), and \(v_3=5\) points squared. Consider the ordered contrasts \(C_1=\bar{x}_1-\bar{x}_0\), \(C_2=\bar{x}_2-\bar{x}_0\), and \(T_{13}=\bar{x}_1-\bar{x}_3\). Calculate their covariance matrix in this order.

The diagonal entries are the contrast variances: \(v_1+v_0=5\), \(v_2+v_0=6\), and \(v_1+v_3=8\). The pair \(C_1,C_2\) shares arm 0 with the same sign, so its covariance is \(v_0=2\). The pair \(C_1,T_{13}\) shares arm 1 with the same sign, so its covariance is \(v_1=3\). The pair \(C_2,T_{13}\) has no arm in common, so its covariance is zero. Hence

$$ \operatorname{Cov} \begin{pmatrix} C_1\\C_2\\T_{13} \end{pmatrix} = \begin{pmatrix} 5&2&3\\ 2&6&0\\ 3&0&8 \end{pmatrix} \ \text{points}^2. $$

The matrix is symmetric: covariance does not depend on the order in which the two contrasts are named. Its entries have consistent units, and each diagonal entry agrees with the variance of its contrast. This matrix is specific to the stated model and arm variances; changing an allocation changes the relevant \(v_g\) values.

Checks, Alternatives, and Limitations

A reliable calculation can be organized as a short sequence. Write each contrast explicitly as a difference of arm means, identify any shared arms, and multiply the two coefficients for each shared arm by that arm mean’s variance. Add the contributions if more than one arm is shared. Under independent arms, pairs with no shared arm have covariance zero.

1
Write the contrasts.
Keep the order of each difference visible; changing the order changes the coefficient signs.
2
Locate shared arms.
Do not treat two appearances of the control mean as independent quantities.
3
Calculate each contribution.
For a shared arm, multiply its two coefficients and \(v_g=\sigma_g^2/n_g\), then sum the contributions.
4
Check scale and structure.
Covariance has squared outcome units, is symmetric when the contrast order is reversed, and has variances on the diagonal.

The direct expansion of covariance is a useful alternative when the shared-arm pattern is not immediately clear. It makes the assumptions visible and helps catch a sign error. The shared-arm lookup is faster for routine pairwise calculations. A correlation calculation is useful when the goal is a unitless measure of association between two contrast estimates, but it requires both contrast variances as well as their covariance. It cannot replace the covariance when a covariance matrix is needed.

A separate control group for each treatment changes which random means are shared; it does not justify carrying over the shared-control covariance. Likewise, if outcomes in different arms are dependent, the zero-covariance contributions assumed above may no longer be zero. These formulas also describe the covariance of the contrasts under the specified variance model; they do not by themselves establish a causal treatment effect or address multiplicity.

Common warning signs include a covariance with outcome units rather than squared outcome units, a nonzero result for contrasts with no shared arm under the independence assumption, or a positive sign when the sole shared arm appears with opposite signs. If the arm variances are estimated rather than specified, substituting estimates gives an estimated covariance, not an exact known value. The calculations above use specified variances and do not account for uncertainty in variance estimates.

Key takeaway: For arm-to-arm contrasts under independent-arm sampling, trace the shared arm means. Each shared arm contributes its mean variance multiplied by the product of the two contrast coefficients; absent shared arms contribute zero.

Check Your Understanding

Answer each question using the independent-arm model. The solutions are included below for checking.

  1. If \(C_1=\bar{x}_1-\bar{x}_0\) and \(C_2=\bar{x}_2-\bar{x}_0\), with \(v_0=3\) points squared, what is their covariance?
  2. If \(C_1=\bar{x}_1-\bar{x}_0\) and \(T_{12}=\bar{x}_1-\bar{x}_2\), with \(v_1=2.5\) points squared, what is their covariance?
  3. If \(C_2=\bar{x}_2-\bar{x}_0\) and \(T_{12}=\bar{x}_1-\bar{x}_2\), with \(v_2=6\) points squared, what is their covariance?
  4. Under independent arms, what is the covariance between \(T_{12}=\bar{x}_1-\bar{x}_2\) and \(T_{34}=\bar{x}_3-\bar{x}_4\)?

Solutions. (1) The shared control has coefficient \(-1\) in both contrasts, so the covariance is \((-1)(-1)(3)=3\) points squared. (2) The shared arm 1 has coefficient \(+1\) in both contrasts, giving \((+1)(+1)(2.5)=2.5\) points squared. (3) The shared arm 2 has coefficients \(+1\) and \(-1\), giving \((+1)(-1)(6)=-6\) points squared. (4) The contrasts share no arm means, so their covariance is zero under the independent-arm model.

Clinical Biostats