Tutorials › Statistical Genetics › Comparing Frequencies With Unequal Population Sample Sizes

Allele Frequencies Across Populations · Tutorial 111 of 989

Comparing Frequencies With Unequal Population Sample Sizes

Calculate frequency contrasts and uncertainty with unequal chromosome counts, and choose weights that match the population quantity you intend to estimate.

Intermediate 10 min read

What You'll Learn

  • Calculate allele-frequency contrasts and their standard errors when chromosome counts differ
  • Construct and interpret an approximate confidence interval for a difference in frequencies
  • Distinguish an equal-population average from a chromosome-count-weighted frequency
  • Explain why inverse-variance weighting gives more influence to more precise estimates
  • Identify the common-frequency assumption behind pooling as an estimate of one shared frequency
  • Check how dependence among allele copies can affect uncertainty

Why Unequal Counts Matter

An allele frequency estimated from many chromosome copies is usually more precise than one estimated from few copies. Consequently, comparing populations with unequal sample sizes requires two decisions: how to quantify uncertainty in the contrast, and which population-level quantity a combined estimate is meant to represent. Weighting by sample size can make an estimate more precise for one target, but it does not automatically make it representative of every population equally.

Let population \(j\) contribute \(m_j\) sampled chromosome copies, of which \(k_j\) carry the allele of interest. Its sample allele frequency is \(\hat{p}_j=k_j/m_j\). When the chromosome counts differ, the frequencies still have the same interpretation and units (proportions), but their sampling variances differ.

Definition: For population \(j\), let \(p_j\) be the population frequency of the allele, \(m_j\) the number of sampled chromosome copies, and \(k_j\) the number of those copies carrying the allele. The sample frequency is \(\hat{p}_j=k_j/m_j\). A frequency contrast between populations 1 and 2 is \(\hat{p}_1-\hat{p}_2\), estimating the population difference \(p_1-p_2\).

For the standard calculation in this tutorial, assume chromosome copies are sampled independently within each population, each copy has the population’s allele frequency, and the samples from different populations are independent. Under this binomial sampling model, \(k_j\sim\operatorname{Binomial}(m_j,p_j)\), so \(\operatorname{Var}(\hat{p}_j)=p_j(1-p_j)/m_j\). Diploid genotypes can yield \(m_j=2n_j\) copies when \(n_j\) individuals have complete genotypes; the independence assumption must still be appropriate. If relatedness or inbreeding induces dependence between copies, the simple binomial variance can understate uncertainty, and an effective-copy adjustment may be needed.

Uncertainty in a Two-Population Contrast

With independent samples, the variance of a difference is the sum of the two variances. The standard error uses the unknown population frequencies replaced by their sample estimates. Thus a population with fewer sampled copies generally contributes more uncertainty to the contrast, even though the contrast itself gives the two population frequencies equal and opposite coefficients.

$$ \widehat{\operatorname{Var}}(\hat{p}_1-\hat{p}_2) = \frac{\hat{p}_1(1-\hat{p}_1)}{m_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{m_2}, \qquad SE(\hat{p}_1-\hat{p}_2) = \sqrt{\widehat{\operatorname{Var}}(\hat{p}_1-\hat{p}_2)}. $$

This plug-in standard error supports a large-sample, approximate confidence interval. When the counts of both allele types are adequate in both populations, an approximate 95% interval is the observed contrast plus or minus 1.96 standard errors. Its repeated-sampling interpretation is that the procedure would cover the fixed difference \(p_1-p_2\) in about 95% of repeated samples under the model. It is not a statement that the particular interval has a 95% probability of containing the fixed difference. For rare alleles or small counts, a Wald interval can be unreliable, especially near zero or one; use an interval procedure designed for binomial proportions rather than relying on this approximation.

Worked Example: Contrasting Frequencies With Different Counts

Suppose two hypothetical, independently sampled populations contribute 200 and 80 chromosome copies. The allele is observed 60 times in population 1 and 12 times in population 2. Assume the independent-copy binomial model is appropriate.

The sample frequencies are

$$ \hat{p}_1=\frac{60}{200}=0.300, \qquad \hat{p}_2=\frac{12}{80}=0.150. $$

The estimated contrast is \(0.300-0.150=0.150\), or 15.0 percentage points. Its estimated variance and standard error are

$$ \widehat{\operatorname{Var}}(\hat{p}_1-\hat{p}_2) = \frac{0.300(0.700)}{200} + \frac{0.150(0.850)}{80} = 0.001050+0.00159375 = 0.00264375, $$ $$ SE=\sqrt{0.00264375}=0.05142. $$

There are 60 allele copies and 140 non-allele copies in the first sample, and 12 and 68 in the second, so neither population has a very small observed count for either allele. A normal approximation is reasonable for this illustration. The approximate 95% interval is

$$ 0.150\ \pm\ 1.96(0.05142) = 0.150\ \pm\ 0.1008 = [0.0492,\ 0.2508]. $$

Under the model, this interval is compatible with a population 1 minus population 2 difference from about 4.9 to 25.1 percentage points. The smaller chromosome count in population 2 contributes more to the estimated variance here, despite its lower estimated frequency.

Two Different Ways to Combine Populations

A combined frequency is meaningful only after its target is specified. Two common targets are different when population frequencies or sample sizes differ. An equal-population average gives every population the same weight, regardless of how many copies were sampled. A chromosome-count-weighted average gives each sampled chromosome copy the same weight; populations with more copies therefore contribute more.

$$ \hat{p}_{\mathrm{equal}}=\frac{1}{J}\sum_{j=1}^{J}\hat{p}_j, \qquad \hat{p}_{\mathrm{copies}}= \frac{\sum_{j=1}^{J}k_j}{\sum_{j=1}^{J}m_j} = \sum_{j=1}^{J}\frac{m_j}{\sum_{\ell=1}^{J}m_\ell}\hat{p}_j. $$

The first estimates the arithmetic mean of the \(J\) population frequencies, treating the populations equally. The second estimates the frequency among the chromosome copies represented by the combined samples; its population target is the corresponding chromosome-count-weighted average of the \(p_j\). If the populations have distinct frequencies, these targets need not be equal. Neither weighting rule is universally preferable: the appropriate one follows from the scientific question and the intended representation of populations.

Worked Example: Equal-Population and Copy-Weighted Targets

Consider two hypothetical populations. Population 1 has 90 copies of the allele among 300 sampled chromosome copies, while population 2 has 8 among 40. Assume independent binomial sampling within and between populations.

Their frequencies are \(90/300=0.300\) and \(8/40=0.200\). The equal-population estimate is

$$ \hat{p}_{\mathrm{equal}}=\frac{0.300+0.200}{2}=0.250. $$

The combined-copy estimate is instead

$$ \hat{p}_{\mathrm{copies}}=\frac{90+8}{300+40} =\frac{98}{340} =0.2882. $$

The first number estimates the mean of the two population frequencies. The second estimates the frequency in a combined set of sampled copies, in which population 1 contributes \(300/340\) of the copies. The difference between 0.250 and 0.2882 is not a calculation error: the estimates address different targets.

For the equal-population estimate, independence gives the plug-in variance

$$ \widehat{\operatorname{Var}}(\hat{p}_{\mathrm{equal}}) = \frac{1}{4}\left\{ \frac{0.300(0.700)}{300} + \frac{0.200(0.800)}{40} \right\} = \frac{0.000700+0.004000}{4} = 0.001175, $$ $$ SE(\hat{p}_{\mathrm{equal}})=\sqrt{0.001175}=0.03428. $$

For the copy-weighted estimate, the weights are \(300/340\) and \(40/340\). Its plug-in variance is

$$ \widehat{\operatorname{Var}}(\hat{p}_{\mathrm{copies}}) = \left(\frac{300}{340}\right)^2\frac{0.300(0.700)}{300} + \left(\frac{40}{340}\right)^2\frac{0.200(0.800)}{40} = \frac{300(0.210)+40(0.160)}{340^2} = 0.0006003, $$ $$ SE(\hat{p}_{\mathrm{copies}})=\sqrt{0.0006003}=0.02450. $$

These standard errors are calculated under the stated sampling model. Their sizes do not establish that one estimate is generally better: the estimates target different quantities. A smaller standard error is useful only when the estimate also matches the intended target.

Why Inverse-Variance Weighting Favors Larger Samples

Precision weighting has a precise justification when several independent estimates measure the same underlying quantity. Suppose \(\hat{\theta}_j\) is unbiased for a common parameter \(\theta\), with known variance \(V_j\), and consider a weighted estimate \(\sum_j a_j\hat{\theta}_j\), where the weights sum to one. Its variance is \(\sum_j a_j^2V_j\). The weights that minimize this variance are proportional to inverse variance.

1
Require unbiasedness.
For the weighted estimate to remain unbiased for the common \(\theta\), require \(\sum_j a_j=1\).
2
Write its variance.
Independence gives \(\operatorname{Var}(\sum_j a_j\hat{\theta}_j)=\sum_j a_j^2V_j\).
3
Minimize under the constraint.
Minimize \(\sum_j a_j^2V_j-\lambda(\sum_j a_j-1)\). Differentiating with respect to \(a_j\) gives \(2a_jV_j-\lambda=0\), so \(a_j=\lambda/(2V_j)\).
4
Normalize the weights.
Using \(\sum_j a_j=1\), obtain \(a_j=(1/V_j)/\sum_\ell(1/V_\ell)\). Thus the estimate with smaller variance receives greater weight.

If every population has the same true frequency \(p\), then \(\operatorname{Var}(\hat{p}_j)=p(1-p)/m_j\). Its inverse is proportional to \(m_j\), so the inverse-variance weights are \(m_j/\sum_\ell m_\ell\). The resulting estimate is the pooled frequency \(\sum_j k_j/\sum_j m_j\). This explains the connection between pooling and precision weighting under a common-frequency model. In practice, \(p\) is unknown, but its common factor cancels from the normalized weights.

The common-frequency condition matters. If the population frequencies genuinely differ, the estimates do not all estimate one shared \(p\). Pooling still computes a well-defined copy-weighted descriptive frequency, but it should not be presented as an estimate of a universal common frequency without justification. Likewise, an equal-population average is not an inefficient version of the same target when the scientific question is specifically about the average population.

Worked Example: Pooling Under a Common-Frequency Model

Suppose two hypothetical samples have 8 allele copies among 40 chromosomes and 40 among 160 chromosomes. For this example, assume both populations share a common frequency \(p\), and chromosome copies are independent. The two observed frequencies are \(0.200\) and \(0.250\).

Because the shared-frequency model makes the two estimates unbiased for the same \(p\), inverse-variance weighting gives weights proportional to 40 and 160. The weighted estimate is

$$ \hat{p}_{\mathrm{pooled}} = \frac{40(0.200)+160(0.250)}{40+160} = \frac{8+40}{200} = 0.240. $$

The equal-weight average would be \((0.200+0.250)/2=0.225\). It is also unbiased under the common-frequency assumption, but it gives the less precise estimate from 40 copies as much weight as the estimate from 160 copies. To compare the estimated precision, use the pooled estimate in the common-frequency variance formula. The pooled estimator has

$$ \widehat{\operatorname{Var}}(\hat{p}_{\mathrm{pooled}}) = \frac{0.240(0.760)}{200} = 0.000912, \qquad SE(\hat{p}_{\mathrm{pooled}})=0.03020. $$

The equal-weight estimate has estimated variance under the same model

$$ \widehat{\operatorname{Var}}\left(\frac{\hat{p}_1+\hat{p}_2}{2}\right) = \frac{0.240(0.760)}{4} \left(\frac{1}{40}+\frac{1}{160}\right) = 0.001425, \qquad SE=0.03775. $$

Thus pooling is more precise for estimating the shared \(p\) in this model. The two observed sample frequencies differ, but that alone does not establish that their underlying frequencies differ; sampling variation can produce such a discrepancy. If the shared-frequency assumption is not appropriate, the pooled number instead has a copy-weighted interpretation, and the equal-weight estimate may better match a question about the average population.

Practical Checks and Common Pitfalls

Before reporting a comparison, state the target, the sampling model, and the uncertainty calculation. For a contrast, specify the order of subtraction: population 1 minus population 2 is positive when the estimated frequency is higher in population 1. For a combined estimate, state whether populations or chromosome copies receive equal influence. These details make the result interpretable and prevent a weighting choice from silently changing the question.

  • Pitfall: “The larger sample should always dominate.” That is appropriate for estimating a shared frequency under the common-frequency model, or for estimating the frequency among the combined sampled copies. It is not automatically appropriate for an equal-population average.
  • Pitfall: “Pooled frequency is the average population frequency.” In general it is a chromosome-count-weighted average. It equals the simple average only in special cases, such as equal chromosome counts or identical population frequencies.
  • Pitfall: “The standard error depends only on the total number of copies.” For a two-population contrast, both frequencies and both chromosome counts enter the variance. A small sample can contribute substantial uncertainty even when the other population is sampled extensively.
  • Pitfall: “All allele copies are necessarily independent.” Dependence among copies, such as that induced by inbreeding or related sampled individuals, can invalidate the binomial variance used here. Check whether the sampling model is suitable before interpreting the standard error.
  • Pitfall: “A confidence interval gives the probability that the fixed difference lies in this interval.” The standard confidence-interval interpretation concerns the long-run coverage of the procedure under its assumptions, not a probability assigned to the fixed parameter after observing the data.
Key takeaway: Unequal chromosome counts affect precision, but the right weights depend on the target. Use the sum of population-specific sampling variances for an independent-sample contrast; use inverse-variance weighting to estimate a shared frequency; and use equal population weights when the target is the average frequency across populations.

Check Your Understanding

Answer each question by naming the target and the assumptions that matter.

  1. Two independent populations have 100 and 400 sampled chromosome copies. Under independent binomial sampling, what determines the standard error of their frequency contrast?
  2. One population has frequency 0.10 based on 100 chromosome copies, and another has frequency 0.30 based on 20 copies. Which estimate is the equal-population average, and which is the copy-weighted frequency?
  3. Why are weights proportional to chromosome counts appropriate for estimating a common allele frequency under the independent binomial model?
  4. Can the pooled frequency be interpreted as the mean frequency across populations when chromosome counts differ? Explain.
  5. Name one sampling feature that could make the independent-copy variance formula underestimate uncertainty.
Clinical Biostats