Tutorials › High-Dimensional Genomic Data Analysis › How Ancestry Confounds Genetic Comparisons

Population Structure, Ancestry and Relatedness · Tutorial 110 of 795

How Ancestry Confounds Genetic Comparisons

Learn to recognize ancestry confounding, quantify its contribution to a genetic association, and distinguish pooled patterns from within-ancestry comparisons.

Intermediate 10 min read

What You'll Learn

  • Identify the confounding path linking ancestry, genotype, and outcome.
  • Calculate a pooled genetic association from ancestry-specific frequencies and risks.
  • Use the law of total covariance to separate within- and between-ancestry association.
  • Recognize how group composition can create or reverse a pooled association.
  • Compare stratified comparisons, ancestry adjustment, and ancestry restriction.
  • Diagnose overlap and interpretation problems in ancestry-aware comparisons.

Why Ancestry Can Create a Genetic Association

A genetic variant may appear associated with an outcome even when it has no effect on that outcome. One reason is that ancestry is associated with both the variant’s frequency and the outcome’s frequency. Pooling people across ancestry groups can then make genotype and outcome co-vary because of group membership, rather than because the genotype changes the outcome.

Here, ancestry means population background as represented by genetic ancestry and its correlated demographic, geographic, social, or environmental factors. It is not a single biological cause of an outcome. The term is useful for describing structure in genetic data, but an ancestry label can stand in for several distinct processes. A genetic association is a statistical relationship between genotype and outcome; by itself, it does not establish that changing the genotype would change the outcome.

Definition: Ancestry confounding occurs when ancestry is associated with both genotype \(G\) and outcome \(Y\), so that the path \(G \leftarrow A \rightarrow Y\) contributes to their observed association. Here \(A\) denotes ancestry. This contribution can occur whether or not a separate causal effect of \(G\) on \(Y\) exists.

A simplified causal diagram makes the issue visible:

$$ A \rightarrow G,\qquad A \rightarrow Y,\qquad G \rightarrow Y $$

The path \(G \leftarrow A \rightarrow Y\) is a noncausal route between genotype and outcome. It is open in an unadjusted comparison. The arrow \(G \rightarrow Y\) represents the genetic effect one might want to estimate; it may be absent, present, or different across groups. The diagram is a model of assumed relationships, not proof that ancestry causes every factor associated with the outcome.

For a simple comparison to isolate a genetic effect within ancestry groups, the comparison must be meaningful within those groups: both genotype states must occur, and outcome risks for people with the same genotype must be comparable apart from genotype under the causal assumptions being considered. In real data, other sources of confounding, measurement error, selection, or different genetic effects across groups can remain. Ancestry adjustment alone cannot guarantee that all such problems are removed.

A Pooled Association With No Within-Group Effect

Consider a hypothetical binary outcome and a binary genotype indicator \(G\), where \(G=1\) means carrying at least one copy of a specified allele and \(G=0\) means carrying none. Suppose two equally sized ancestry groups differ in both allele frequency and outcome risk. Within each group, however, outcome risk is identical for carriers and noncarriers.

Worked Example: A Spurious Pooled Risk Difference

Imagine two hypothetical groups of 1,000 people each. In group 0, 20% are carriers and the outcome risk is 10% for either genotype. In group 1, 80% are carriers and the outcome risk is 30% for either genotype. These are constructed numbers, not results from a real study.

In group 0, there are \(1{,}000(0.20)=200\) carriers and \(800\) noncarriers. The expected numbers of outcomes are \(200(0.10)=20\) among carriers and \(800(0.10)=80\) among noncarriers. In group 1, there are \(800\) carriers and \(200\) noncarriers. The expected outcome counts are \(800(0.30)=240\) and \(200(0.30)=60\), respectively.

GroupCarriers: peopleCarriers: outcomesNoncarriers: peopleNoncarriers: outcomes
02002080080
180024020060

Pooling the groups gives \(1{,}000\) carriers with \(260\) outcomes and \(1{,}000\) noncarriers with \(140\) outcomes. Thus the pooled risks are \(260/1{,}000=0.26\) and \(140/1{,}000=0.14\), giving a risk difference of \(0.26-0.14=0.12\), or 12 percentage points. The pooled odds ratio is \( (260/740)/(140/860)=2.158 \), approximately.

Yet within group 0 the risk difference is \(0.10-0.10=0\), and within group 1 it is \(0.30-0.30=0\). In this example, genotype has no within-group association with outcome. The pooled difference arises because carriers are more common in the group with the higher outcome risk. Calling the pooled 12-point difference a genetic effect would confuse group composition with a within-group genotype effect.

Why the Between-Group Component Appears

The same reasoning can be expressed with covariance. For any two random variables \(G\) and \(Y\), and a grouping variable \(A\), the law of total covariance states that

$$ \operatorname{Cov}(G,Y) = E\{\operatorname{Cov}(G,Y\mid A)\} + \operatorname{Cov}\{E(G\mid A),E(Y\mid A)\}. $$

The first term averages the genotype–outcome covariance within ancestry groups. The second measures whether groups with higher mean genotype values also have higher mean outcomes. If the within-group covariance is zero but both group means rise together, the pooled covariance is positive. This identity describes an association; interpreting it causally requires additional assumptions.

Worked Example: Decomposing the Pooled Covariance

Use the two equally sized groups from the previous example, with \(G\) coded 0 or 1 and \(Y\) coded 0 or 1. Group 0 has \(E(G\mid A=0)=0.2\) and \(E(Y\mid A=0)=0.1\). Group 1 has corresponding means 0.8 and 0.3. Within each group, \(G\) and \(Y\) are independent under the specified risks, so \(\operatorname{Cov}(G,Y\mid A)=0\).

The pooled means are \(E(G)=0.5\) and \(E(Y)=0.2\). The pooled product mean is \(E(GY)=0.13\): the group-specific contributions are \(0.5(0.2)(0.1)=0.01\) and \(0.5(0.8)(0.3)=0.12\). Therefore,

$$ \operatorname{Cov}(G,Y)=E(GY)-E(G)E(Y)=0.13-(0.5)(0.2)=0.03. $$

The between-group term gives the same result. Its two contributions are \(0.5(0.2-0.5)(0.1-0.2)=0.015\) and \(0.5(0.8-0.5)(0.3-0.2)=0.015\). Their sum is \(0.03\), while the within-group term is zero. The pooled covariance is entirely between groups in this example.

Group Composition Can Reverse a Pattern

Confounding does not merely create associations when no within-group pattern exists. It can also change the direction of a pooled association. The following example gives the genotype a positive within-group risk difference, but makes genotype frequencies so different across groups that the pooled comparison goes in the opposite direction.

Worked Example: A Reversed Pooled Association

Suppose two equally sized hypothetical groups have the following risks: in group 0, risk is 5% for noncarriers and 10% for carriers; in group 1, risk is 40% for noncarriers and 45% for carriers. Thus carriers have a 5-percentage-point higher risk within each group. Now suppose 90% of group 0 are carriers, but only 10% of group 1 are carriers.

Among carriers, the group 0 and group 1 shares are 90% and 10%. Their pooled risk is \(0.90(0.10)+0.10(0.45)=0.135\), or 13.5%.

Among noncarriers, the group shares are 10% and 90%. Their pooled risk is \(0.10(0.05)+0.90(0.40)=0.365\), or 36.5%. The pooled risk difference, carrier minus noncarrier, is \(0.135-0.365=-0.230\), or −23 percentage points. It is negative even though the within-group difference is +5 percentage points in both groups. The reason is that noncarriers are concentrated in the high-risk group, while carriers are concentrated in the low-risk group.

This is an extreme illustration, but the lesson is general: a pooled comparison answers a question about the observed mixture of groups. It need not answer the within-group genetic question of interest.

Comparison Strategies and Their Limits

The appropriate response depends on the study design and the scientific question. A direct comparison within ancestry strata makes the source of the pooled pattern easier to inspect. A model that includes ancestry-related covariates can estimate a genotype association conditional on those covariates, provided the model is suitable and there is adequate overlap. In genomic studies, principal components are often used to represent major axes of genetic variation; the detailed adjustment procedure is treated separately.

ApproachPotential benefitImportant limitation
Compare within ancestry strataShows whether genotype and outcome differ within groups rather than only across them.Can be imprecise when some genotype states are uncommon; broad strata may leave residual structure.
Adjust for ancestry-related covariatesCan account for measured or summarized structure while retaining more observations.Depends on covariate choice, model form, overlap, and whether relevant structure is captured.
Restrict to a more homogeneous groupMay reduce some between-group differences in a particular comparison.Can reduce sample size and generalizability, and does not rule out confounding within the restricted group.

A key condition for a within-group comparison is overlap: within the ancestry range being analyzed, there must be enough people with each genotype state to estimate outcome contrasts. If a genotype occurs almost exclusively in one group, the data provide little basis for separating a genotype difference from a group difference. A regression model cannot create information that is absent from the design.

Diagnostics and Common Mistakes

Before interpreting a genetic association, compare genotype frequencies and outcome summaries across ancestry groups or across relevant ancestry gradients. Then compare the pooled association with within-group patterns. Large changes in the estimate after accounting for ancestry are a warning that group composition matters; they do not, by themselves, prove that the adjusted estimate is unbiased. Also inspect whether genotype states overlap across groups and whether the outcome is measured comparably.

  • Confusing association with causation. A small p-value for a pooled association does not show that the variant causes the outcome. The confounding path may explain some or all of the association.
  • Treating ancestry as a single biological mechanism. An ancestry measure can summarize genetic similarity while also correlating with other outcome-related factors. The causal interpretation requires attention to those processes.
  • Assuming adjustment solves every problem. Adjustment can fail when ancestry is poorly represented, model assumptions are wrong, overlap is weak, or other confounders remain.
  • Assuming a pooled estimate is a simple average of group-specific effects. Pooled risks depend on the genotype-specific mix of groups. As the reversal example shows, that mix can differ substantially between carriers and noncarriers.

The introductory material on population stratification established that allele frequencies can vary across populations. The crucial consequence for association analysis is that outcome differences aligned with those population patterns can induce a genotype–outcome association. The purpose of ancestry-aware comparison is not to claim that all population differences have been removed, but to make the comparison and its assumptions explicit.

Key takeaway: When ancestry affects both genotype frequencies and outcome risks, the pooled genotype–outcome association contains a between-ancestry component. Examine within-group comparisons, verify overlap, and interpret any remaining association as causal only under defensible assumptions.

Check Your Understanding

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

  1. In the causal diagram \(A \rightarrow G\) and \(A \rightarrow Y\), what path can create a noncausal association between genotype and outcome?
  2. Two equally sized groups have carrier frequencies 0.1 and 0.7 and outcome risks 0.05 and 0.25, with no within-group genotype effect. Does the direction of the pooled association follow from these group means?
  3. Why does little genotype overlap across ancestry groups make an adjusted genetic comparison unreliable?
  4. Can an ancestry-adjusted association automatically be interpreted as causal? Give one reason why not.

Solutions. (1) The open backdoor path is \(G \leftarrow A \rightarrow Y\). (2) Yes: carriers are more common in the group with higher outcome risk, so the pooled association is expected to be positive even though each within-group association is zero. (3) With little overlap, the data contain few like-for-like comparisons of genotype states within ancestry ranges; genotype and ancestry remain difficult to distinguish empirically. (4) No. For example, relevant confounders may remain unmeasured, or the ancestry adjustment may fail to represent the structure adequately.

Clinical Biostats