Tutorials › Statistical Genetics › Simpson’s Paradox in Genetic Association

Population Stratification Control · Tutorial 182 of 989

Simpson’s Paradox in Genetic Association

Learn to calculate and interpret pooled and ancestry-specific genotype–phenotype associations, and see how differing group composition can change their apparent direction and magnitude.

Intermediate 10 min read

What You'll Learn

  • Define Simpson’s paradox for a genotype–phenotype association across ancestry groups
  • Calculate within-group and pooled phenotype prevalences and risk differences
  • Identify how genotype-specific ancestry composition affects pooled comparisons
  • Decompose a pooled difference into within-group and composition components
  • Compare a pooled estimate with an estimate using common ancestry weights
  • Avoid treating an observational association as a causal genetic effect

Why Pooling Can Change an Association

A genotype–phenotype association is often summarized by comparing phenotype prevalence between genotype groups. But if ancestry groups differ both in phenotype prevalence and in how frequently the genotype occurs, the pooled comparison combines two features: the within-group genotype association and the different ancestry composition of the genotype groups. The pooled result can therefore differ substantially from the comparisons made within ancestry groups.

This phenomenon is called Simpson’s paradox when a pattern seen in every separate group reverses after the groups are pooled. In genetic association, the reversal can make a genotype associated with higher phenotype prevalence overall even though its prevalence is lower among carriers within every ancestry group. Pooling can also create an apparent association when the within-group comparisons show none.

Definition: Let \(G=1\) indicate that a person carries a specified genotype (or belongs to a prespecified genotype category), and let \(G=0\) denote the comparison category. Let \(Y=1\) indicate the phenotype of interest, and let \(S=s\) identify an ancestry group. The within-group phenotype prevalence is \(p_{gs}=P(Y=1\mid G=g,S=s)\). The pooled prevalence for genotype group \(g\) is \(p_g=P(Y=1\mid G=g)\). The pooled risk difference is \(p_1-p_0\), and the within-group risk difference in group \(s\) is \(p_{1s}-p_{0s}\). These are descriptive associations; neither a risk difference nor a reversal by itself establishes a causal effect of genotype.

For observed data, the corresponding prevalence estimates are event counts divided by the number of people in the relevant genotype group. For example, \(\hat p_{1s}\) is the number with \(Y=1\) among carriers in ancestry group \(s\), divided by the total number of carriers in that group. The pooled estimate instead divides the total number of phenotype-positive carriers across all groups by the total number of carriers across all groups.

The distinction matters because the ancestry composition among carriers need not match the composition among noncarriers. A pooled prevalence is an average of stratum-specific prevalences, but the weights in that average depend on the genotype group being summarized.

$$ p_g=\sum_s P(S=s\mid G=g)\,p_{gs} $$

Thus, even if the stratum-specific prevalences are known, the pooled comparison cannot be understood without also considering the weights \(P(S=s\mid G=g)\). When those weights differ between carriers and noncarriers, the pooled contrast includes a composition difference as well as the within-group contrasts.

A Reversal After Pooling

The following hypothetical data show the classic reversal. The phenotype is binary, and the table reports the number of phenotype-positive people and the total number in each ancestry-by-genotype group. The two ancestry groups have different baseline phenotype prevalences, and carriers are distributed very differently across the groups than noncarriers.

Ancestry groupCarriers with phenotypeCarriers totalNoncarriers with phenotypeNoncarriers total
A510090900
B40590050100
Both groups pooled4101,0001401,000

Worked Example: A Within-Group Association Reverses

Calculate the risk difference among carriers and noncarriers within each ancestry group, then calculate the pooled risk difference. All counts are hypothetical.

Group A. The carrier prevalence is \(5/100=0.050\), and the noncarrier prevalence is \(90/900=0.100\). The within-group risk difference is

$$ \hat p_{1A}-\hat p_{0A}=0.050-0.100=-0.050 $$

In group A, carriers have a phenotype prevalence 5 percentage points lower than noncarriers.

Group B. The carrier prevalence is \(405/900=0.450\), and the noncarrier prevalence is \(50/100=0.500\). Therefore,

$$ \hat p_{1B}-\hat p_{0B}=0.450-0.500=-0.050 $$

The within-group difference is again negative: 5 percentage points lower among carriers.

Pooled comparison. There are \(5+405=410\) phenotype-positive carriers among \(100+900=1{,}000\) carriers. There are \(90+50=140\) phenotype-positive noncarriers among \(900+100=1{,}000\) noncarriers. Thus,

$$ \hat p_1-\hat p_0=\frac{410}{1{,}000}-\frac{140}{1{,}000} =0.410-0.140=0.270 $$

The pooled prevalence is 27 percentage points higher among carriers, despite being 5 percentage points lower among carriers in each ancestry group. This is a reversal, not evidence that the genotype has a positive causal effect. The carrier group is 90% from group B, whereas the noncarrier group is only 10% from group B; group B also has much higher phenotype prevalence in both genotype categories.

How the Composition Difference Enters

A short algebraic decomposition makes the source of the reversal explicit. Write \(w_{gs}=P(S=s\mid G=g)\), the proportion of genotype group \(g\) belonging to ancestry group \(s\). Since \(p_g=\sum_s w_{gs}p_{gs}\), add and subtract \(\sum_s w_{1s}p_{0s}\):

$$ \begin{aligned} p_1-p_0 &=\sum_s w_{1s}p_{1s}-\sum_s w_{0s}p_{0s}\\ &=\sum_s w_{1s}(p_{1s}-p_{0s}) +\sum_s(w_{1s}-w_{0s})p_{0s}. \end{aligned} $$

The first term is a weighted average of the within-group differences, using the ancestry distribution among carriers as weights. The second term is a composition term: it compares the ancestry distributions of carriers and noncarriers, weighted by the noncarrier phenotype prevalences. This is an identity, not an assumption about a biological mechanism.

For the reversal example, the carrier ancestry weights are \(w_{1A}=0.10\) and \(w_{1B}=0.90\); the noncarrier weights are \(w_{0A}=0.90\) and \(w_{0B}=0.10\). The within-group term is

$$ 0.10(-0.050)+0.90(-0.050)=-0.050. $$

The composition term is

$$ (0.10-0.90)(0.100)+(0.90-0.10)(0.500) =-0.080+0.400=0.320. $$

Adding the terms gives \(-0.050+0.320=0.270\), exactly the pooled difference calculated from the counts. Here the positive composition term is larger than the negative within-group term, so the pooled association has the opposite sign.

An Association That Appears Only in the Pooled Data

Pooling can produce a nonzero contrast even when carriers and noncarriers have the same phenotype prevalence within each ancestry group. In that case, the within-group comparisons show no association, but the genotype groups can still have different pooled prevalences if their ancestry compositions differ.

Worked Example: A Pooled Difference With No Within-Group Difference

Consider these hypothetical counts. Within each ancestry group, the phenotype prevalence is the same for carriers and noncarriers.

Ancestry groupCarriers with phenotypeCarriers totalNoncarriers with phenotypeNoncarriers total
A1010090900
B36090040100

In group A, both prevalences equal \(0.100\): \(10/100=0.100\) among carriers and \(90/900=0.100\) among noncarriers. The within-group difference is \(0.100-0.100=0\). In group B, both prevalences equal \(0.400\): \(360/900=0.400\) and \(40/100=0.400\). Its within-group difference is also \(0.400-0.400=0\).

After pooling, carriers have \(10+360=370\) phenotype-positive people among \(100+900=1{,}000\), giving prevalence \(370/1{,}000=0.370\). Noncarriers have \(90+40=130\) phenotype-positive people among \(900+100=1{,}000\), giving prevalence \(130/1{,}000=0.130\). The pooled difference is

$$ 0.370-0.130=0.240. $$

The pooled data show a 24-percentage-point difference even though each within-group difference is zero. Carriers are more often in group B, where the phenotype is more prevalent, while noncarriers are more often in group A. This example is a numerical illustration of how composition can create a pooled association; the pooled contrast alone does not show that genotype is associated with phenotype within either group.

Same Direction, Different Magnitude

Pooling does not always reverse an association or create one from within-group null comparisons. Even when the within-group differences point in the same direction, the pooled estimate can differ from a comparison that gives the ancestry groups the same weights for carriers and noncarriers. The next example calculates both contrasts to show why the chosen weights matter.

Worked Example: Comparing Pooled and Common-Weight Differences

Suppose the hypothetical counts are as follows.

Ancestry groupCarriers with phenotypeCarriers totalNoncarriers with phenotypeNoncarriers total
A6040060600
B15060080400

In group A, carrier prevalence is \(60/400=0.150\) and noncarrier prevalence is \(60/600=0.100\), so the difference is \(0.050\). In group B, the prevalences are \(150/600=0.250\) and \(80/400=0.200\), again giving a difference of \(0.050\).

For the pooled comparison, there are \(60+150=210\) phenotype-positive carriers among \(400+600=1{,}000\), so the carrier prevalence is \(0.210\). There are \(60+80=140\) phenotype-positive noncarriers among \(600+400=1{,}000\), so the noncarrier prevalence is \(0.140\). The pooled difference is \(0.210-0.140=0.070\), or 7 percentage points.

Now calculate a common-weight comparison that assigns half the weight to each ancestry group for both genotype categories. The weighted carrier prevalence is \((0.150+0.250)/2=0.200\), and the weighted noncarrier prevalence is \((0.100+0.200)/2=0.150\). Their difference is \(0.200-0.150=0.050\), or 5 percentage points. This common-weight contrast preserves the positive direction but is not the raw pooled difference. It answers a different descriptive comparison because it uses the same ancestry weights in both genotype categories.

Interpreting the Comparison Carefully

A pooled estimate describes the observed mixture of ancestry groups among each genotype category. A within-group estimate compares genotype categories among people in the same named group. A common-weight estimate describes a comparison after assigning both genotype categories the same chosen group weights. These quantities need not agree because they average over different populations or use different weights.

The relevant description depends on the scientific question, the sampling design, and whether the ancestry groups capture important structure relevant to the association. The calculations here do not determine which estimate is appropriate for a causal claim, nor do they establish that the group labels fully represent ancestry-related variation. They show why the pooled result should not be interpreted as if it were automatically the within-group association.

The risk difference is used in these examples because it makes direction and magnitude transparent in percentage points. Other association measures can also behave differently after pooling; the exact numerical pattern depends on the measure and the data. Do not assume that an association measure has the same value in pooled and stratified analyses merely because it describes the same genotype and phenotype.

Common Mistakes

  • Reading a pooled difference as a within-ancestry result. A 27-percentage-point pooled difference does not mean carriers have higher prevalence within ancestry groups. In the first example, the within-group differences are both negative.
  • Assuming a reversal proves a genetic effect. The calculations establish descriptive differences in the hypothetical data, not a causal effect of the genotype. Group composition and other features of the data may matter.
  • Comparing percentages without checking denominators. A count of phenotype-positive individuals is not a prevalence. Divide by the total number in the corresponding ancestry-by-genotype group before comparing.
  • Calling every change in magnitude a Simpson reversal. A reversal means that the pooled direction opposes the direction in each stratum. A pooled estimate that is larger or smaller but retains the same direction is a change in magnitude, not a reversal.
  • Assuming the pooled estimate is a simple average of within-group estimates. The pooled prevalence uses genotype-specific ancestry weights. If those weights differ, its contrast need not equal an average using common weights.
Key takeaway: Compare pooled and within-ancestry prevalence estimates using their denominators and weights. When ancestry composition differs between genotype groups, a pooled association can appear, disappear, or reverse. Always describe which comparison was calculated and avoid interpreting a descriptive association as causation.

Check Your Understanding

Use the definitions and calculations in this tutorial to answer the following questions.

  1. In the reversal example, what were the two within-group risk differences, and what was the pooled risk difference?
  2. Why can genotype groups with zero within-group differences have a nonzero pooled difference?
  3. In the decomposition of \(p_1-p_0\), what does the composition term represent?
  4. In the final worked example, why is the common-weight difference different from the raw pooled difference?
  5. What condition distinguishes a Simpson reversal from a pooled estimate that merely has a different magnitude?
Clinical Biostats