Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › Geometric Interpretation of Contrast Correlation

Shared-Control Correlation · Tutorial 84 of 499

Geometric Interpretation of Contrast Correlation

Learn to construct contrast-error vectors and interpret their angle as the correlation between treatment-control comparisons.

Advanced 9 min read

What You'll Learn

  • Represent group-mean errors as coordinates with unit variance.
  • Construct a vector for each treatment-control contrast.
  • Derive the cosine formula for the correlation between two contrasts.
  • Interpret how the shared-control component affects the angle.
  • Check the geometric calculation against covariance and variance formulas.
  • Recognize assumptions and situations in which this geometry does not apply.

From Shared Control to Geometry

When two treatments are each compared with the same control, the estimated contrasts share one source of sampling error: the error in the control mean. Algebraically, this shared component creates covariance between the contrasts. Geometrically, it appears as a shared coordinate in their error vectors. Under the standard equal-variance sampling model, the correlation between the contrast errors is the cosine of the angle between those vectors.

The geometry is a way to see the covariance calculation, not a different statistical model. It also helps distinguish the shared part from the treatment-specific parts: increasing the contribution of the control coordinate relative to the other coordinates makes the contrast vectors point more nearly in the same direction.

Model and Contrast-Error Vectors

Suppose there is one control group, labelled \(0\), and treatment groups \(1,\ldots,m\). In group \(j\), let \(\bar{x}_j\) estimate the population mean \(\mu_j\), and define its mean error as \(E_j=\bar{x}_j-\mu_j\). Assume that individual observations are independent within each group and independent across groups, and that every observation has the same finite variance \(\sigma^2\). These assumptions give independent group-mean errors with variances \(v_j=\sigma^2/n_j\), where \(n_j\) is the sample size in group \(j\).

The estimated treatment-control contrast is \(\bar{x}_i-\bar{x}_0\). Its error around the population contrast \(\mu_i-\mu_0\) is therefore \(D_i=E_i-E_0\). To express that error as an ordinary dot product with coordinates of unit variance, define \(Z_j=E_j/\sqrt{v_j}\). The \(Z_j\) have mean zero, variance one, and are uncorrelated with one another. Independence follows from the sampling assumptions; uncorrelatedness and unit variances are what the covariance calculation below requires.

Definition: For treatment \(i\), the whitened contrast-error vector \(a_i\) has coordinate \(-\sqrt{v_0}\) in the control position, coordinate \(+\sqrt{v_i}\) in treatment position \(i\), and zero in every other treatment position. Then \(D_i=a_i^\mathsf{T}Z\), where \(Z=(Z_0,\ldots,Z_m)^\mathsf{T}\). The vector records the coefficients of the independent, unit-variance group errors after rescaling them to unit variance.

For example, with two treatments the vectors have coordinates \(a_1=(-\sqrt{v_0},\sqrt{v_1},0)\) and \(a_2=(-\sqrt{v_0},0,\sqrt{v_2})\), in the order control, treatment 1, treatment 2. Their control coordinates have the same sign because both contrasts subtract the same control mean. Their treatment coordinates lie on different axes.

Why Correlation Is a Cosine

For vectors \(a_i\) and \(a_k\), the dot product is the sum of products of corresponding coordinates. Since the coordinates of \(Z\) have variance one and are uncorrelated, the covariance of the two contrast errors is exactly that dot product. The squared length of each vector is the variance of its contrast error.

$$ \begin{aligned} \operatorname{Cov}(D_i,D_k) &=\operatorname{Cov}(a_i^\mathsf{T}Z,a_k^\mathsf{T}Z) =a_i^\mathsf{T}a_k,\\ \operatorname{Var}(D_i)&=a_i^\mathsf{T}a_i=\|a_i\|^2,\\ \operatorname{Corr}(D_i,D_k) &=\frac{a_i^\mathsf{T}a_k}{\|a_i\|\,\|a_k\|} =\cos(\theta_{ik}), \end{aligned} $$

Here \(\theta_{ik}\) is the angle between the two nonzero vectors. The last equality is the definition of the cosine of the angle between vectors. In this shared-control setting, the only nonzero coordinate they share is the control coordinate, so \(a_i^\mathsf{T}a_k=v_0\) for distinct treatments \(i\) and \(k\). Their squared lengths are \(v_0+v_i\) and \(v_0+v_k\). Thus the geometric expression reproduces the usual correlation formula:

$$ \operatorname{Corr}(D_i,D_k) =\frac{v_0}{\sqrt{(v_0+v_i)(v_0+v_k)}} =\frac{1/n_0}{\sqrt{(1/n_0+1/n_i)(1/n_0+1/n_k)}}. $$

The second expression uses the common-variance assumption, which cancels \(\sigma^2\). This angle interpretation concerns the coefficient vectors in whitened error space. It is not the angle between the observed group means, nor does it depend on the particular numerical values of the observed contrasts.

Worked Example: Equal Group Sizes Give a 60-Degree Angle

Suppose the control and two treatment groups each have \(n_j=25\) observations, and the common individual variance is \(\sigma^2=100\) score-units squared. Find the correlation between the two contrast errors and the angle between their vectors.

Each group-mean error has variance \(v_j=\sigma^2/n_j=100/25=4\) score-units squared. The vectors, in control–treatment 1–treatment 2 order, are \(a_1=(-2,2,0)\) and \(a_2=(-2,0,2)\). Their dot product is \((-2)(-2)=4\), and each squared length is \(4+4=8\). Therefore

$$ \operatorname{Corr}(D_1,D_2) =\frac{a_1^\mathsf{T}a_2}{\|a_1\|\,\|a_2\|} =\frac{4}{\sqrt{8}\sqrt{8}} =\frac{4}{8}=0.5000. $$

The angle is \(\theta_{12}=\arccos(0.5000)=60.00^\circ\). Each vector has a control component and a separate treatment component of the same length. The shared coordinate makes the dot product positive, while the two distinct treatment coordinates add to the vector lengths but not to their dot product.

Allocation Changes the Angle

With unequal sample sizes, the group-mean errors have unequal variances, so the vector coordinates have unequal lengths. A larger control variance lengthens the shared coordinate in both vectors. Larger treatment variances lengthen their separate coordinates. The cosine formula shows how these changes alter the angle without requiring a drawing.

Worked Example: Unequal Sample Sizes

Suppose there are \(n_0=40\) control observations, \(n_1=20\) observations in treatment 1, and \(n_2=80\) in treatment 2. Assume a common individual variance of \(\sigma^2=16\) score-units squared, with independent observations within and across groups. Calculate the contrast-error correlation and the angle.

The group-mean error variances are \(v_0=16/40=0.4000\), \(v_1=16/20=0.8000\), and \(v_2=16/80=0.2000\), in score-units squared. Thus \(a_1=(-\sqrt{0.4},\sqrt{0.8},0)\) and \(a_2=(-\sqrt{0.4},0,\sqrt{0.2})\). Their dot product is \(0.4\); their squared lengths are \(0.4+0.8=1.2\) and \(0.4+0.2=0.6\). Hence

$$ \operatorname{Corr}(D_1,D_2) =\frac{0.4000}{\sqrt{1.200}\sqrt{0.6000}} =\frac{0.4000}{\sqrt{0.7200}} \approx 0.4714. $$

The angle is \(\arccos(0.4714)\approx61.87^\circ\). The covariance and variances give the same result: \(\operatorname{Cov}(D_1,D_2)=v_0=0.4000\), \(\operatorname{Var}(D_1)=1.200\), and \(\operatorname{Var}(D_2)=0.6000\) score-units squared. This check confirms that the vector lengths and dot product correspond to the contrast errors specified in the model.

Worked Example: A Small Shared Component Means a Wide Angle

Consider two contrast errors whose group-mean error variances are \(v_0=1\), \(v_1=3\), and \(v_2=8\), all in the same squared measurement units. These could arise, for example, under the common-variance model with sample sizes inversely proportional to those variances. Find the correlation and angle.

The vectors are \(a_1=(-1,\sqrt{3},0)\) and \(a_2=(-1,0,\sqrt{8})\). Their dot product is \(1\), and their squared lengths are \(1+3=4\) and \(1+8=9\). It follows that

$$ \operatorname{Corr}(D_1,D_2) =\frac{1}{\sqrt{4}\sqrt{9}} =\frac{1}{6} \approx 0.1667,\qquad \theta_{12}=\arccos(1/6)\approx80.41^\circ. $$

The shared control component is present in both vectors, but it is small relative to their treatment-specific components. The vectors therefore point in directions closer to perpendicular than to one another, and the correlation is positive but modest.

What the Geometry Reveals—and What It Does Not

The angle gives an immediate visual interpretation of the correlation: a small angle corresponds to a cosine near one, a right angle to zero, and an obtuse angle to a negative cosine. For two treatment-versus-control contrasts with the sign convention used here, the dot product is \(v_0>0\); consequently their angle is acute and their correlation is positive. In this particular setting, reducing the relative contribution of the shared control error makes the vectors less aligned.

The argument is a short linear-algebra justification, not a normal-theory result. It uses finite variances and uncorrelated standardized group-mean errors; it does not require the errors to have a normal distribution. The geometric calculation describes covariance and correlation. It does not, by itself, establish the joint probability distribution of the contrast statistics.

In practice, the geometry is useful in three ways. First, it makes the source of dependence visible: the control coordinate is shared, whereas each treatment coordinate is specific to one contrast. Second, it provides a check on calculations. The dot product must reproduce the covariance, and each vector's squared length must reproduce its contrast variance. Third, it shows why marginal standard errors alone do not specify the relationship between two contrasts: their directions, not just their lengths, matter.

Assumptions, Diagnostics, and Alternatives

Before using this representation, check that the group means have the variances assigned to their coordinates and that errors from different groups are uncorrelated. Independence of observations within each group is one standard way to justify \(\operatorname{Var}(\bar{x}_j)=\sigma^2/n_j\); independence across groups justifies zero covariance between distinct group-mean errors. If observations within a group are correlated, the sample mean need not have variance \(\sigma^2/n_j\), and the coordinates based on that formula are not justified. The stated geometry also uses a common individual variance. With unequal variances, a more general covariance calculation is needed rather than this equal-variance version.

A useful diagnostic is to compute the covariance directly from the contrast definitions, then compare it with the vector dot product. Also check that each vector's squared length equals the corresponding contrast variance and that the resulting correlation lies between \(-1\) and \(1\). A mismatch can signal a sign error, a missing variance contribution, or an incorrectly specified sampling variance. A correlation outside that range is impossible for a valid covariance and variance calculation.

The main alternative is to calculate covariance and variance algebraically, then divide covariance by the product of standard deviations. That route is compact and often easiest for a single pair of contrasts. The vector method is a complementary representation: it turns the same calculation into a dot product and makes shared and contrast-specific error components visible. Neither method repairs a wrong sampling model. In particular, the simple vectors above are limited to treatment-control contrasts under the stated equal-variance assumptions; they do not cover every contrast structure or every covariance pattern.

Common pitfall: It is not enough to assume that observations are independent across groups and have equal individual variances to conclude that a group mean has variance \(\sigma^2/n_j\). Within-group independence, or a direct assumption establishing that variance, is also needed. A second frequent error is to use the shared control variance as the entire contrast variance. Each contrast also contains its own treatment-mean error, so its squared vector length is \(v_0+v_i\), not just \(v_0\).
Key takeaway: Under the independent, common-variance group-mean model, each treatment-control contrast error is a dot product between a whitened error vector and a vector of unit-variance coordinates. The correlation between two such errors is the cosine of the angle between their coefficient vectors.

Check Your Understanding

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

  1. With equal group-mean error variances \(v\) in the control and two treatment groups, what are the contrast vectors and their correlation?
  2. For \(v_0=2\), \(v_1=2\), and \(v_2=6\), find the correlation between the two treatment-control contrast errors.
  3. Why does the dot product of the two contrast vectors equal their covariance?
  4. Does the cosine interpretation require normally distributed group-mean errors? State the assumptions it does require.

Solutions. (1) The vectors are \((-\sqrt v,\sqrt v,0)\) and \((-\sqrt v,0,\sqrt v)\). Their dot product is \(v\), and each squared length is \(2v\), so the correlation is \(v/(\sqrt{2v}\sqrt{2v})=1/2\). (2) The dot product is \(v_0=2\), and the squared lengths are \(2+2=4\) and \(2+6=8\). Thus the correlation is \(2/(\sqrt4\sqrt8)=2/\sqrt{32}\approx0.3536\). (3) Each contrast error is the dot product of its coefficient vector with \(Z\); because the coordinates of \(Z\) have unit variances and are uncorrelated, expanding the covariance leaves exactly the sum of products of matching coefficients, which is the vector dot product. (4) Normality is not required. The calculation requires finite variances and uncorrelated group-mean errors with the variances used to construct the vectors; the usual sampling justification here assumes independent observations within and across groups and a common individual variance.

Clinical Biostats