Why a Null Within-Group Association May Not Be a Pooled Null
Suppose genotype dosage and a quantitative phenotype are unrelated within each ancestry group. If the groups differ both in their average genotype dosage and in their average phenotype, the combined data can nevertheless show a genotype–phenotype association. The key is that a pooled comparison mixes two sources of covariance: variation among individuals within groups and variation among the group means.
We use \(A\) for ancestry group, \(G\) for genotype dosage, and \(Y\) for phenotype. For a biallelic variant, \(G\) is typically coded as 0, 1, or 2 copies of the allele of interest. The phenotype \(Y\) may be a measurement such as a concentration in milligrams per deciliter. The calculations below describe a target population or an empirical data set in which each individual has one observed group, genotype, and phenotype. We assume the relevant means and covariances exist.
This definition concerns statistical association, not causation. In particular, a zero within-group covariance does not by itself establish that genotype has no causal effect. The focus here is how a pooled covariance can arise even when the within-group covariances are zero.
The Covariance Decomposition
Let \(\pi_a=P(A=a)\) be the proportion of the population in group \(a\), \(g_a=E[G\mid A=a]\) its mean genotype dosage, and \(\mu_a=E[Y\mid A=a]\) its mean phenotype. The pooled means are \(\bar g=E[G]=\sum_a\pi_a g_a\) and \(\bar\mu=E[Y]=\sum_a\pi_a\mu_a\). The law of total covariance gives:
The first term is the weighted average of within-group covariances. The second is the covariance of the group-specific means, weighted by group proportions. Under the within-group null just defined, the first term is zero, so the pooled covariance is entirely the between-group component:
Thus, the pooled covariance is nonzero when the weighted deviations of genotype means and phenotype means have a nonzero net product. In two groups, this condition is especially transparent. If group 1 has proportion \(\pi\), and the two groups have means \(g_1,g_0\) and \(\mu_1,\mu_0\), then the between-group term is \(\pi(1-\pi)(g_1-g_0)(\mu_1-\mu_0)\). It is nonzero if both mean differences are nonzero; its sign is the sign of their product.
Worked Examples
Worked Example: A Positive Pooled Association Under the Within-Group Null
Consider a hypothetical sample of eight individuals, four in each of two ancestry groups. Within group A, genotype dosages are 0, 0, 0, and 2, and every phenotype value is 10 units. Within group B, dosages are 0, 2, 2, and 2, and every phenotype value is 14 units. Within each group, the phenotype is constant, so the within-group covariance is zero.
The group proportions are both \(0.5\). The genotype means are \(g_A=0.5\) and \(g_B=1.5\); the phenotype means are \(\mu_A=10\) and \(\mu_B=14\). Therefore, \(\bar g=1\) and \(\bar\mu=12\). The between-group covariance is:
The within-group terms are zero, so the pooled covariance is 1 phenotype unit per dosage in covariance units. As a check using all eight observations, the products \((G-\bar g)(Y-\bar\mu)\) sum to 8, giving empirical covariance \(8/8=1\) when the empirical distribution uses denominator \(n\). The pooled genotype variance is 1, so the pooled least-squares slope is \(1/1=1\) phenotype unit per additional allele copy. The pooled slope is not evidence of a within-group association: it reflects the alignment of the two group means.
Worked Example: Reversing the Sign of the Pooled Association
Keep the same hypothetical genotype dosages and group proportions, but let every phenotype in group A be 14 units and every phenotype in group B be 10 units. The within-group covariances remain zero. The pooled means are still \(\bar g=1\) and \(\bar\mu=12\), while \(g_A=0.5\), \(g_B=1.5\), \(\mu_A=14\), and \(\mu_B=10\).
Substitution into the between-group term gives:
Thus the pooled covariance is \(-1\). The pooled genotype variance is still 1, so the pooled slope is \(-1/1=-1\) phenotype unit per dosage. The sign changed because the group with the lower mean dosage now has the higher mean phenotype. Neither example has a within-group association; the pooled direction follows the relationship between the group means.
Worked Example: Between-Group Differences That Cancel
Consider eight hypothetical individuals in three groups. Group A has two individuals with dosages 0 and 1 and phenotype 12 for both. Group B has four individuals with dosages 0, 2, 0, and 2 and phenotype 10 for all four. Group C has two individuals with dosages 1 and 2 and phenotype 12 for both. Each group has zero within-group covariance because its phenotype is constant.
The proportions are \(0.25\), \(0.5\), and \(0.25\). The genotype means are \(0.5\), \(1\), and \(1.5\), while the phenotype means are 12, 10, and 12. The pooled means are \(\bar g=1\) and \(\bar\mu=11\). The between-group contribution is:
The pooled covariance is zero, despite differences among the group means. The deviations in groups A and C contribute equally in magnitude and oppositely in sign, while group B contributes zero because its genotype mean equals the pooled genotype mean. Here the pooled genotype variance is \(6/8=0.75\), so the pooled slope is also zero. Group mean differences can therefore produce a pooled covariance, but they do not guarantee one: their weighted contributions can cancel.
Why the Decomposition Holds
The identity follows by splitting each variable into its group mean and its deviation from that mean. For an individual in group \(a\), write \(G=g_a+(G-g_a)\) and \(Y=\mu_a+(Y-\mu_a)\). Subtracting the pooled means and multiplying gives four terms. On averaging, the two cross-terms vanish because the within-group deviations have conditional mean zero.
For the second term, conditioning on \(A\) gives \(E[Y-\mu_A\mid A]=0\); for the third, \(E[G-g_A\mid A]=0\). Both expectations are therefore zero. The first term is the between-group covariance of the means. The final term is the average within-group covariance, since:
This proves the decomposition and shows precisely where the two components come from. For two groups, the between-group term simplifies to \(\pi(1-\pi)(g_1-g_0)(\mu_1-\mu_0)\), making its direction and magnitude explicit. With more groups, individual contributions may have different signs, as in the third example.
Connection to a Pooled Regression Slope
For a simple linear regression of \(Y\) on \(G\) with an intercept, the population least-squares slope is \(\operatorname{Cov}(G,Y)/\operatorname{Var}(G)\), provided \(\operatorname{Var}(G)>0\). In a sample, the corresponding slope is the sample covariance divided by the sample variance, using the same covariance convention in numerator and denominator. A nonzero pooled covariance therefore gives a nonzero pooled slope; its units are phenotype units per dosage unit.
This slope summarizes the pooled linear association. It does not say that each ancestry group has that slope, and it does not identify a causal effect. If the within-group covariances are zero, the pooled slope’s numerator comes from group mean differences; the denominator also includes both within- and between-group genotype variation. Consequently, the magnitude of the slope is not simply the between-group covariance.
When to Expect a Nonzero Pooled Association
Under zero within-group covariance, a nonzero pooled covariance requires a nonzero weighted covariance between group genotype means and group phenotype means. In the two-group case, both group-mean differences must be nonzero. If the genotype means match, the between-group term is zero even if phenotype means differ; if phenotype means match, it is also zero even if genotype means differ. With three or more groups, nonzero differences can still sum to zero.
The decomposition also clarifies what to inspect in a population-genetics analysis: the ancestry-specific genotype means, phenotype means, and proportions, as well as the within-group relationships. A pooled statistic alone cannot reveal which component generated the observed association. These calculations describe the covariance structure; they do not prescribe a particular adjustment method.
Common Mistake
- Wrong reasoning: “The genotype and phenotype have zero covariance within every ancestry group, so their pooled covariance must also be zero.”
- Correction: The pooled covariance includes a between-group term. If ancestry groups differ in mean genotype and mean phenotype, the products of those mean deviations can add to a nonzero value even when every within-group covariance is zero.
- A second caution: “The pooled slope is nonzero, so the variant must affect the phenotype.” A pooled association is not a causal conclusion. In the null examples, differences between group means alone generated the pooled slope.
Check Your Understanding
Use the covariance decomposition to answer the questions below.
- In a two-group population with proportions \(0.4\) and \(0.6\), genotype means 0.8 and 1.3, and phenotype means 5 and 9 units, calculate the between-group covariance under a within-group covariance null.
- Can different phenotype means across groups create a nonzero pooled covariance if the group genotype means are identical? Explain using the decomposition.
- In the second worked example, why did the pooled slope change sign when the phenotype group means were switched?
- For three or more groups, can there be group mean differences but zero between-group covariance? Give the reason.
- What does a nonzero pooled regression slope establish, and what does it not establish, when within-group covariances are zero?