Tutorials › Multivariate Statistics (Graduate) › Two Independent Samples and the Mean-Difference Estimand

Two-Sample and Multiple Means · Tutorial 262 of 975

Two Independent Samples and the Mean-Difference Estimand

Formulate the two-sample model and its mean-difference target, while keeping independence, equal means, and equal covariance matrices conceptually distinct.

Intermediate 9 min read

What You'll Learn

  • Specify mutual independence within each group and independence between groups.
  • Define each population mean vector and the target difference of mean vectors.
  • Distinguish a common covariance matrix from two group-specific covariance matrices.
  • Derive the covariance of each sample mean under the sampling assumptions.
  • Derive the covariance of the difference between the two sample mean vectors.
  • Recognize why equal covariance does not imply equal means or independent coordinates.

Why Begin With the Sampling Model?

A comparison of two groups with multivariate outcomes concerns more than a single measurement. For example, a study might record both systolic blood pressure and a laboratory marker for each participant. The target is then a comparison of two population mean vectors, while the variability of that comparison depends on how observations are sampled and on each group’s covariance structure.

The sampling model makes these ingredients explicit before any test or interval is chosen. In particular, three claims must not be confused: observations are independent, the population means are equal, and the population covariance matrices are equal. They are different assumptions or hypotheses, and none follows automatically from either of the others.

The Independent Two-Sample Model

Suppose each observation has \(p\) components. Write \(X_{1i}\) for observation \(i\) in group 1 and \(X_{2j}\) for observation \(j\) in group 2, where \(i=1,\ldots,n_1\) and \(j=1,\ldots,n_2\). Each observation is a random column vector in \(\mathbb{R}^p\). The two groups may have different distributions.

Definition: The independent two-sample multivariate model assumes that within group \(g\), the observations \(X_{gi}\) are mutually independent and identically distributed, with finite second moments, mean vector \(E[X_{gi}]=\mu_g\), and covariance matrix \(\operatorname{Cov}(X_{gi})=\Sigma_g\), for \(g=1,2\). The two groups are also independent of one another: every observation in group 1 is independent of every observation in group 2. Here \(\mu_g\in\mathbb{R}^p\), and \(\Sigma_g\) is a \(p\times p\) covariance matrix.

Thus the complete collection of observations is mutually independent, while observations within a group share a common distribution. The covariance matrices are symmetric and positive semidefinite; they need not be positive definite unless a later method requires that stronger condition. Independence of observations does not assert independence of the \(p\) components within any one vector. Those components may be correlated, as represented by off-diagonal entries of \(\Sigma_g\).

The sample mean vector in group \(g\) is \(\bar X_g=n_g^{-1}\sum_i X_{gi}\). The population quantities \(\mu_g\) and \(\Sigma_g\) describe the sampling model; the sample mean is a random vector computed from the observed data.

Worked Example: Defining the Two Populations

A clinical study compares two independently recruited treatment groups. For each participant, the outcome vector is \(X=(\text{systolic blood pressure change},\text{marker change})^\mathsf{T}\), measured in mmHg and in the marker’s stated units. Suppose group 1 has mean vector \(\mu_1=( -5,\,2)^\mathsf{T}\), and group 2 has mean vector \(\mu_2=( -2,\,1)^\mathsf{T}\).

The first component of \(\mu_1\) is the group 1 population mean change in blood pressure; the second is its population mean marker change. The entries of \(\mu_2\) have the corresponding meanings for group 2. Since the component units differ, the vector’s two coordinates must be interpreted separately in their own units.

The sampling model requires that participants’ outcome vectors be mutually independent within each group, and that the two groups be independent. It does not require the blood pressure and marker changes for the same participant to be independent. Nor does the model require the two groups to have equal means or equal covariances.

The Mean-Difference Estimand

The central target for a two-group comparison is the difference between the population mean vectors. Fix the order of subtraction: throughout, group 1 minus group 2.

Definition: The mean-difference estimand is the parameter vector \(\delta=\mu_1-\mu_2\in\mathbb{R}^p\). Its \(k\)th coordinate, \(\delta_k=\mu_{1k}-\mu_{2k}\), is the difference between the groups’ population means on outcome \(k\). The null statement of equal mean vectors is \(\delta=0\), equivalently \(\mu_1=\mu_2\).

The estimand is a population parameter, not an observed difference. The corresponding sample mean difference \(\bar X_1-\bar X_2\) is a random vector that estimates it. A positive coordinate means that the group 1 population mean exceeds the group 2 population mean for that outcome, under the chosen subtraction order; a negative coordinate means the reverse.

Worked Example: Interpreting the Mean-Difference Vector

Use the means in the clinical example: \(\mu_1=(-5,2)^\mathsf{T}\) and \(\mu_2=(-2,1)^\mathsf{T}\). Subtract coordinate by coordinate:

$$ \delta=\mu_1-\mu_2 = \begin{pmatrix}-5\\2\end{pmatrix} - \begin{pmatrix}-2\\1\end{pmatrix} = \begin{pmatrix}-3\\1\end{pmatrix}. $$

The blood-pressure mean change in group 1 is 3 mmHg lower than in group 2, because \(-5-(-2)=-3\). The marker mean change in group 1 is 1 unit higher, because \(2-1=1\). The vector is not a single overall difference with a common unit; it records one mean difference for each outcome.

Equal mean vectors would instead require both coordinates to be zero. Equality of one coordinate alone would establish equality of the population means for that outcome, but not equality of the full vectors.

Separate Covariances and a Common-Covariance Assumption

In the general independent-sample model, the groups have separate covariance matrices, \(\Sigma_1\) and \(\Sigma_2\). The diagonal entries describe the variances of individual outcomes in each group; the off-diagonal entries describe within-observation covariances between pairs of outcomes. A common-covariance model imposes the additional restriction that these matrices are equal.

Definition: The common-covariance assumption is \(\Sigma_1=\Sigma_2=\Sigma\) for some covariance matrix \(\Sigma\). The separate-covariance model allows \(\Sigma_1\) and \(\Sigma_2\) to differ. Neither covariance specification, by itself, imposes any restriction on \(\mu_1\) and \(\mu_2\).

A common covariance matrix is a claim about the groups’ within-observation variances and covariances, not a claim that their means agree. Conversely, equal means do not imply equal covariances. Also, assuming a common covariance does not make the coordinates within an observation independent: that would require additional restrictions on the off-diagonal entries of \(\Sigma\).

Worked Example: Different Covariances Despite Matching Marginal Variances

Consider two two-outcome populations with covariance matrices

$$ \Sigma_1= \begin{pmatrix}4&1\\1&9\end{pmatrix}, \qquad \Sigma_2= \begin{pmatrix}4&-1\\-1&9\end{pmatrix}. $$

Both matrices have the same diagonal entries, so both groups have variance 4 on outcome 1 and variance 9 on outcome 2. But the covariance between the outcomes is 1 in group 1 and \(-1\) in group 2. Therefore \(\Sigma_1\ne\Sigma_2\), and the common-covariance assumption does not hold.

These are valid positive-definite covariance matrices: each is symmetric, has positive first diagonal entry, and has determinant \(4(9)-1^2=35>0\). The example shows why matching marginal variances alone cannot establish equality of covariance matrices. Even if the groups had exactly the same mean vector, their covariance matrices would still differ.

Covariance of the Sample Mean and Mean Difference

The independence assumptions determine how sampling variation combines across observations and across groups. The following results require finite second moments and the mutual independence specified in the model; they do not require multivariate normal distributions.

Theorem: Under the independent two-sample model, \(\operatorname{Cov}(\bar X_g)=\Sigma_g/n_g\) for each group \(g\). Moreover,
$$ E[\bar X_1-\bar X_2]=\delta, \qquad \operatorname{Cov}(\bar X_1-\bar X_2) = \frac{\Sigma_1}{n_1}+\frac{\Sigma_2}{n_2}. $$

Proof. By linearity of expectation and the common group mean,

$$ E[\bar X_g] = E\left[\frac{1}{n_g}\sum_{i=1}^{n_g}X_{gi}\right] = \frac{1}{n_g}\sum_{i=1}^{n_g}E[X_{gi}] = \mu_g. $$

For the covariance, bilinearity gives

$$ \operatorname{Cov}(\bar X_g) = \frac{1}{n_g^2} \sum_{i=1}^{n_g}\sum_{j=1}^{n_g} \operatorname{Cov}(X_{gi},X_{gj}). $$

When \(i=j\), the covariance term is \(\Sigma_g\). When \(i\ne j\), mutual independence implies \(\operatorname{Cov}(X_{gi},X_{gj})=0\). Thus the double sum contains \(n_g\) copies of \(\Sigma_g\) and all remaining terms are zero, yielding \(\operatorname{Cov}(\bar X_g)=n_g\Sigma_g/n_g^2=\Sigma_g/n_g\).

Linearity of expectation now gives \(E[\bar X_1-\bar X_2]=\mu_1-\mu_2=\delta\). To obtain its covariance, expand the covariance of a difference:

$$ \operatorname{Cov}(\bar X_1-\bar X_2) = \operatorname{Cov}(\bar X_1)+\operatorname{Cov}(\bar X_2) -\operatorname{Cov}(\bar X_1,\bar X_2) -\operatorname{Cov}(\bar X_2,\bar X_1). $$

The two groups are independent, so both cross-covariance matrices are zero. Substituting the group-specific sample-mean covariances proves the stated formula. \(\square\)

Under the common-covariance assumption, this result simplifies to \(\operatorname{Cov}(\bar X_1-\bar X_2)=(1/n_1+1/n_2)\Sigma\). Under separate covariances, both group-specific matrices remain in the expression. The formula makes clear why independence within each group is needed: without it, the off-diagonal terms in the covariance double sum need not vanish.

Worked Example: Sampling Covariance Under Separate Covariances

Suppose \(n_1=10\), \(n_2=20\), and the population covariance matrices are

$$ \Sigma_1= \begin{pmatrix}4&1\\1&9\end{pmatrix}, \qquad \Sigma_2= \begin{pmatrix}1&0.2\\0.2&4\end{pmatrix}. $$

By the theorem, the covariance matrix of the sample mean difference is

$$ \begin{aligned} \operatorname{Cov}(\bar X_1-\bar X_2) &=\frac{1}{10} \begin{pmatrix}4&1\\1&9\end{pmatrix} +\frac{1}{20} \begin{pmatrix}1&0.2\\0.2&4\end{pmatrix}\\ &= \begin{pmatrix}0.4&0.1\\0.1&0.9\end{pmatrix} + \begin{pmatrix}0.05&0.01\\0.01&0.2\end{pmatrix}\\ &= \begin{pmatrix}0.45&0.11\\0.11&1.1\end{pmatrix}. \end{aligned} $$

For example, the variance of the first coordinate of the sample mean difference is \(4/10+1/20=0.45\). Its covariance with the second coordinate is \(1/10+0.2/20=0.11\). The calculation uses the separate covariance matrices; it does not replace them with a common matrix.

Common Mistakes and Why the Model Matters

  • Assuming identical distributions imply independence. Identical distribution describes the marginal distribution of each observation, not the joint dependence among observations. The model must explicitly require mutual independence within each group as well as independence between groups.
  • Confusing equal means with equal covariances. The statement \(\mu_1=\mu_2\) concerns population location; \(\Sigma_1=\Sigma_2\) concerns population variability and dependence among outcomes. Either can hold while the other fails.
  • Treating a common covariance as independent outcomes. A common covariance matrix may have nonzero off-diagonal entries. Equality of group covariance matrices says nothing by itself about whether coordinates within a person are independent.
  • Using a paired model for independent groups. If observations are matched person by person, the two measurements are not independent samples in the sense used here. Their pairing changes the sampling covariance calculation and must be represented in the model.

The distinction between common and separate covariance models matters because it changes the covariance structure of the mean-difference estimator. The estimand remains \(\delta=\mu_1-\mu_2\) either way; it is the model for its sampling variability that changes. Specifying the target and sampling assumptions first prevents a covariance restriction from being mistaken for a statement about the scientific question.

Check Your Understanding

Use the definitions and derivations above to answer the following questions.

  1. State the independence requirements for the two-sample multivariate model. Why is identical distribution within a group not enough to obtain \(\operatorname{Cov}(\bar X_g)=\Sigma_g/n_g\)?
  2. If \(\mu_1=(3,5)^\mathsf{T}\) and \(\mu_2=(1,7)^\mathsf{T}\), what is \(\delta\) under the group 1 minus group 2 convention? Interpret each coordinate.
  3. Can two groups have equal covariance matrices but different mean vectors? Can they have equal mean vectors but different covariance matrices? Explain both answers.
  4. Under what additional covariance restriction does \(\operatorname{Cov}(\bar X_1-\bar X_2)\) simplify to \((1/n_1+1/n_2)\Sigma\)?
  5. Does assuming \(\Sigma_1=\Sigma_2\) imply that the two outcomes measured on one individual are independent? Explain using the meaning of off-diagonal entries.
Clinical Biostats