Tutorials › Multi-Omics Data Integration › Pooled Associations and Simpson’s Paradox Across Cohorts

Batch Effects and Confounding Across Cohorts · Tutorial 118 of 597

Pooled Associations and Simpson’s Paradox Across Cohorts

Use a covariance decomposition to distinguish pooled associations from within-cohort patterns and diagnose Simpson’s paradox across cohorts.

Advanced 10 min read

What You'll Learn

  • Decompose pooled covariance into within-cohort and between-cohort contributions.
  • Recognize when differing cohort means can create a pooled association.
  • Work through hypothetical examples of association creation, erasure, and reversal.
  • Compare pooled, stratified, and cohort-adjusted summaries.
  • Identify diagnostics and limitations when interpreting cross-cohort associations.

Why a Pooled Association Can Mislead

In a multi-cohort analysis, a pooled association between two molecular features can tell a different story from the associations observed within individual cohorts. The reason is that pooling combines two kinds of information: how the features vary together among samples from the same cohort, and how the cohort averages differ from one another. If cohorts have different feature means and different sample compositions, the second component can dominate the first.

This is a form of Simpson’s paradox: an association seen in aggregated data can be absent, weaker, or opposite in the groups that make up those data. The pooled result is not necessarily a calculation error. It is a valid description of the pooled sample, but it may not answer the scientific question of interest. In multi-omics work, a cohort can also represent differences in recruitment, platform, processing, or biology, so the reason for between-cohort shifts requires substantive investigation.

Definition: A pooled association describes the relationship between features after observations from multiple cohorts are combined. A within-cohort association describes that relationship among observations from one cohort, holding cohort membership fixed. Simpson’s paradox occurs when the pooled association differs qualitatively from the within-cohort pattern, for example when a pooled positive association accompanies zero or negative associations in every cohort.

Covariance Decomposition

Let \(X\) and \(Y\) be two measured features on the same \(N\) samples, partitioned into cohorts \(c=1,\ldots,K\). Write \(n_c\) for the number of samples in cohort \(c\), \(w_c=n_c/N\), and \(\bar{x}_c,\bar{y}_c\) for the cohort means. The pooled means are \(\bar{x}=\sum_c w_c\bar{x}_c\) and \(\bar{y}=\sum_c w_c\bar{y}_c\). Define each cohort’s empirical covariance using divisor \(n_c\), and the pooled empirical covariance using divisor \(N\).

Definition: The within-cohort empirical covariance is \(v_{XY,c}=\frac{1}{n_c}\sum_{i\in c}(x_i-\bar{x}_c)(y_i-\bar{y}_c)\). The pooled empirical covariance is \(v_{XY}=\frac{1}{N}\sum_{i=1}^{N}(x_i-\bar{x})(y_i-\bar{y})\). These use divisors \(n_c\) and \(N\), respectively, rather than the \(n-1\) divisor used in the usual sample covariance \(s_{XY}\).

The exact decomposition is:

$$ v_{XY} = \underbrace{\sum_{c=1}^{K} w_c v_{XY,c}}_{\text{weighted within-cohort covariance}} + \underbrace{\sum_{c=1}^{K} w_c(\bar{x}_c-\bar{x})(\bar{y}_c-\bar{y})}_{\text{between-cohort covariance}}. $$

The first term summarizes within-cohort co-variation, weighted by cohort sample size. The second summarizes whether cohorts with above-average \(X\) means also tend to have above-average \(Y\) means. A positive or negative between-cohort term can strengthen, cancel, or overwhelm the within-cohort term.

Why the Decomposition Holds

For any observation in cohort \(c\), add and subtract its cohort mean: \(x_i-\bar{x}=(x_i-\bar{x}_c)+(\bar{x}_c-\bar{x})\), and likewise for \(y_i-\bar{y}\). Multiply these expressions and sum within cohort. The two cross terms vanish because \(\sum_{i\in c}(x_i-\bar{x}_c)=0\) and \(\sum_{i\in c}(y_i-\bar{y}_c)=0\). The remaining terms are the within-cohort cross-product and \(n_c(\bar{x}_c-\bar{x})(\bar{y}_c-\bar{y})\). Summing across cohorts and dividing by \(N\) gives the stated identity.

This identity is descriptive and requires no normality assumption. It does require that \(X\) and \(Y\) be measured on the same samples and that cohort membership partitions those observations. Independence and distributional assumptions become relevant if uncertainty or a formal test is attached to a summary; they are not needed for the arithmetic decomposition itself.

Worked Example: Cohort Differences Create a Pooled Association

Consider two hypothetical cohorts with four paired observations each. In each cohort, the within-cohort covariance is zero, but both feature means are higher in the second cohort.

Cohort A has \(X=(-1,-1,1,1)\) and \(Y=(-1,1,-1,1)\). The cohort means are both zero, and the sum of paired products is \(1-1-1+1=0\), so \(v_{XY,A}=0/4=0\). Cohort B has \(X=(1,1,3,3)\) and \(Y=(1,3,1,3)\). Its means are both 2; after subtracting those means, the centered values have the same zero cross-product, so \(v_{XY,B}=0\).

The pooled means are \(\bar{x}=\bar{y}=1\). The within-cohort contribution is \( (4/8)(0)+(4/8)(0)=0\). The between-cohort contribution is:

$$ \frac{4}{8}(0-1)(0-1)+\frac{4}{8}(2-1)(2-1) =\frac{1}{2}+\frac{1}{2}=1. $$

Thus \(v_{XY}=1\), entirely from between-cohort differences. For context, the pooled variances calculated with divisor 8 are both 2, so the pooled correlation is \(1/\sqrt{2\cdot2}=0.500\). The cohort-specific covariances are zero: the pooled positive correlation does not describe within-cohort co-variation.

When Cohort Composition Erases or Reverses a Pattern

The same decomposition explains cancellation and reversal. If the weighted within-cohort covariance is positive but the between-cohort term is equally negative, the pooled covariance is zero. If the negative term is larger in magnitude, the pooled covariance becomes negative. The following examples use small, deliberately constructed data to make both contributions visible.

Worked Example: Within-Cohort Associations Are Erased by Pooling

For hypothetical Cohort A, let \(X=(0,0,2,2)\) and \(Y=(2,2,4,4)\). Both means are 1 and 3, respectively. Centering each list gives \((-1,-1,1,1)\) for both features, with cross-product sum \(1+1+1+1=4\). Therefore \(v_{XY,A}=4/4=1\). For Cohort B, let \(X=(2,2,4,4)\) and \(Y=(0,0,2,2)\). The means are 3 and 1, and the centered lists again match, giving \(v_{XY,B}=1\). Each cohort has a positive within-cohort association.

The pooled means are \(\bar{x}=\bar{y}=2\). The weighted within-cohort term is \( (4/8)(1)+(4/8)(1)=1\). The between-cohort term is:

$$ \frac{4}{8}(1-2)(3-2)+\frac{4}{8}(3-2)(1-2) =-\frac{1}{2}-\frac{1}{2}=-1. $$

Consequently, the pooled covariance is \(1+(-1)=0\). The positive pattern within each cohort is erased in the pooled covariance because the cohort with the lower \(X\) mean has the higher \(Y\) mean. Zero pooled covariance does not mean the features are unrelated within cohorts.

Worked Example: Pooling Reverses the Within-Cohort Association

Keep Cohort A’s \(X=(0,0,2,2)\), but set \(Y=(3,3,5,5)\). Its means are 1 and 4, and its centered lists match, so its within-cohort covariance is 1. In Cohort B, let \(X=(2,2,4,4)\) and \(Y=(-1,-1,1,1)\). Its means are 3 and 0; the centered lists again match, so \(v_{XY,B}=1\). Both cohorts therefore have positive within-cohort covariance.

The pooled means are \(\bar{x}=2\) and \(\bar{y}=2\). As before, the weighted within-cohort contribution is 1. The between-cohort contribution is:

$$ \frac{4}{8}(1-2)(4-2)+\frac{4}{8}(3-2)(0-2) =-1-1=-2. $$

The pooled covariance is \(1-2=-1\), so its sign is opposite to both within-cohort covariances. The pooled \(X\) variance is 2 and the pooled \(Y\) variance is 5, each using divisor 8. Hence the pooled correlation is \(-1/\sqrt{10}\approx-0.3162\), even though the within-cohort patterns are positive. This is a clear Simpson reversal.

Interpreting and Diagnosing Pooled Results

A pooled correlation is a summary of the combined sample, not automatically an estimate of a common within-cohort relationship. In the examples, the data were constructed so the within-cohort patterns were identical, but real cohorts can have different slopes, nonlinear relationships, or residual variability. In that setting, a single pooled coefficient can conceal meaningful heterogeneity as well as confounding by cohort composition.

Useful diagnostics begin with a cohort-stratified view. Plot \(X\) against \(Y\) with cohort indicated, calculate cohort-specific means and associations, and compare them with pooled summaries. Check cohort sizes, feature ranges, missingness, and whether the same scale and preprocessing are used across cohorts. If a pooled pattern changes sharply after stratification, inspect the between-cohort mean differences and the distribution of samples across cohorts. The earlier material on influential cohorts is relevant when a single cohort may exert disproportionate leverage on a pooled result.

Three common summaries answer related but distinct questions:

ApproachWhat it describesMain caution
Pooled associationCo-variation among all observations combinedIncludes between-cohort structure; may not reflect any cohort’s pattern
Stratified associationsRelationships estimated separately within each cohortCan be noisy in small cohorts and may vary across cohorts
Cohort-adjusted modelAn association conditional on included cohort terms, under the model specificationDepends on adequate overlap, correct specification, and the intended estimand

Adjustment is not a universal repair. If cohorts have little or no overlap in feature values, the within-cohort relationship may be weakly identified or not identified over the pooled range. If cohort membership is entangled with biological group, a model cannot separate their effects without information that distinguishes them. Batch adjustment also does not by itself establish that a resulting association is biological. These concerns connect to the earlier material on confounding and overcorrection; the immediate lesson is to report which association is being summarized.

Common Pitfall and Practical Reporting

  • Wrong reasoning: “The pooled correlation is positive, so the features are positively associated in every cohort.” Correction: The pooled covariance combines within- and between-cohort components. Check the cohort-specific patterns before making that claim.
  • Wrong reasoning: “A zero pooled covariance proves there is no association.” Correction: Opposing components can cancel, as in the erasure example; inspect within-cohort summaries.
  • Wrong reasoning: “A reversal proves the pooled calculation is invalid.” Correction: The pooled statistic can correctly describe the combined sample while answering a different question from the conditional, within-cohort association.

In reporting, state whether the target is an overall association in the sampled mixture, an average within-cohort association, or a cohort-specific relationship. Include cohort-specific estimates or plots when feasible, describe major differences in cohort composition, and avoid causal language unless the design and assumptions support causal interpretation. A descriptive decomposition can reveal why results differ, but it does not determine whether cohort differences are technical, biological, or both.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. If every cohort has zero within-cohort covariance but cohort means for \(X\) and \(Y\) rise together, what can be said about the pooled covariance?
  2. In the erasure example, identify the weighted within-cohort contribution and the between-cohort contribution.
  3. Can a pooled negative correlation coexist with positive within-cohort associations? Give the condition that allows it.
  4. Why is a pooled association not automatically evidence of a common biological relationship across cohorts?

Solutions. (1) The pooled covariance can be positive because its between-cohort term is positive, even though the within term is zero. (2) The within contribution is \(+1\), the between contribution is \(-1\), and their sum is zero. (3) Yes. It occurs when the negative between-cohort term is larger in magnitude than the positive weighted within-cohort term, as in the reversal example. (4) The pooled result mixes within-cohort co-variation with differences in cohort means and composition; cohort-specific patterns and the source of between-cohort shifts must be examined before interpreting it biologically.

Clinical Biostats