Tutorials › Statistical Genetics › Propagating Uncertainty in Mixture-Based Frequency Estimates

Allele Frequencies Across Populations · Tutorial 110 of 989

Propagating Uncertainty in Mixture-Based Frequency Estimates

Derive and apply a delta-method variance for a mixture-frequency estimate when both the source frequencies and mixture proportions are uncertain.

Intermediate 10 min read

What You'll Learn

  • Define the plug-in allele-frequency estimate for a population mixture
  • Use the delta method to approximate its variance from a joint covariance matrix
  • Separate source-frequency, mixture-proportion, and covariance contributions
  • Handle the sum-to-one constraint on mixture proportions
  • Calculate and interpret a standard error and an approximate interval
  • Recognize when ignoring covariance or one source of uncertainty is misleading

Why Mixture Uncertainty Has More Than One Source

A mixture frequency depends on two kinds of information: the allele frequency in each source population and the fraction of the mixture contributed by each source. Even if the mixture formula is straightforward, its estimate can be uncertain because either input is uncertain. When the estimates are statistically related, their covariance also affects the uncertainty in the result.

This tutorial develops a first-order variance approximation for that setting. The goal is not to re-estimate source frequencies or mixture proportions, but to propagate their uncertainty through the mixture calculation. All numerical data below are hypothetical.

Definition: For \(K\) source populations, let \(p_i\) be the allele frequency in source \(i\), and let \(w_i\) be its proportion in the mixture, where \(w_i\geq 0\) and \(\sum_{i=1}^K w_i=1\). The mixture allele frequency is \(q=\sum_{i=1}^K w_i p_i\). Its plug-in estimate is \(\hat{q}_{mix}=\sum_{i=1}^K \hat{w}_i\hat{p}_i\), using estimates of both the source frequencies and the mixture proportions.

The estimated value \(\hat{q}_{mix}\) alone does not describe its precision. For example, the same estimated mixture frequency may be comparatively precise when source frequencies and proportions are known accurately, and much less precise when either input is noisy. Covariance matters as well: estimates that tend to increase together can contribute differently from estimates that tend to move in opposite directions.

Delta-Method Variance

Collect the estimated source frequencies and mixture proportions into the vector \(\hat{Z}=(\hat{p}_1,\ldots,\hat{p}_K,\hat{w}_1,\ldots,\hat{w}_K)\). Let \(\Sigma\) be the covariance matrix of this joint vector, or an estimate of that covariance matrix. The mixture calculation is a smooth function of these inputs. The delta method approximates its variance by evaluating the gradient of that function at the estimated inputs.

Result: For \(\hat{q}_{mix}=\sum_i\hat{w}_i\hat{p}_i\), the gradient, in the stated order of inputs, is \(\hat{g}=(\hat{w}_1,\ldots,\hat{w}_K,\hat{p}_1,\ldots,\hat{p}_K)\). The first-order delta-method variance is \(\widehat{\operatorname{Var}}(\hat{q}_{mix})\approx\hat{g}^{T}\hat{\Sigma}\hat{g}\). The approximate standard error is the square root of this variance.

The quadratic form is compact, but its components show what uncertainty is being propagated. Write \(\widehat{\operatorname{Cov}}\) for an estimated covariance and \(\widehat{\operatorname{Var}}\) for an estimated variance. Expanding the quadratic form gives

$$ \begin{aligned} \widehat{\operatorname{Var}}(\hat{q}_{mix})\approx{}& \sum_i\hat{w}_i^2\widehat{\operatorname{Var}}(\hat{p}_i) +\sum_i\hat{p}_i^2\widehat{\operatorname{Var}}(\hat{w}_i)\\ &+2\sum_{i<j}\hat{w}_i\hat{w}_j \widehat{\operatorname{Cov}}(\hat{p}_i,\hat{p}_j)\\ &+2\sum_{i<j}\hat{p}_i\hat{p}_j \widehat{\operatorname{Cov}}(\hat{w}_i,\hat{w}_j)\\ &+2\sum_i\sum_j\hat{w}_i\hat{p}_j \widehat{\operatorname{Cov}}(\hat{p}_i,\hat{w}_j). \end{aligned} $$

The first line contains the marginal variances of source-frequency estimates and mixture-proportion estimates. The next two lines account for dependence among the source-frequency estimates and among the mixture-proportion estimates. The final line includes every cross-covariance between a source-frequency estimate and a mixture-proportion estimate. A positive covariance adds to the variance when its gradient coefficients have the same sign; a negative covariance can reduce it. The covariance matrix as a whole must be valid, so its resulting quadratic form cannot be negative.

Why the Approximation Has This Form

The key step is a first-order expansion of the mixture function around the estimated inputs. For small changes \(dp_i\) and \(dw_i\), its change is approximately

$$ dq\approx \sum_i \hat{w}_i\,dp_i+\sum_i \hat{p}_i\,dw_i. $$

The coefficient of a source-frequency change is its mixture proportion; the coefficient of a proportion change is the corresponding source frequency. The variance of this linear combination is the gradient multiplied by the joint covariance matrix and then by the gradient transpose. Expanding that variance produces the marginal-variance and covariance terms above.

This is a first-order approximation, not an exact variance identity for arbitrary random inputs. It is most useful when the input estimates are reasonably concentrated around their true values and the mixture function is well approximated locally by its linear expansion. Strong uncertainty, estimates near boundaries, or substantial nonlinear effects can make the approximation less reliable. The calculation also requires a joint covariance matrix that represents the dependence in the actual estimation procedure.

Worked Example: Two Independent Sources and an Uncertain Mixture Proportion

Suppose a hypothetical two-source mixture has estimated source frequencies \(\hat{p}_1=0.30\) and \(\hat{p}_2=0.10\), with standard errors 0.04 and 0.03. The estimated proportion from source 1 is \(\hat{w}=0.60\), with standard error 0.05; the proportion from source 2 is \(1-\hat{w}=0.40\). Assume the two source-frequency estimates are independent of each other and of the estimated mixture proportion. These independence assumptions set all relevant covariance terms to zero.

The estimated mixture frequency is

$$ \hat{q}_{mix}=0.60(0.30)+0.40(0.10)=0.18+0.04=0.22. $$

For two sources, write \(q=wp_1+(1-w)p_2\). The gradient with respect to \((p_1,p_2,w)\) is \((w,1-w,p_1-p_2)\). Thus the delta-method variance is

$$ \begin{aligned} \widehat{\operatorname{Var}}(\hat{q}_{mix}) &\approx \hat{w}^{\,2}SE(\hat{p}_1)^2 +(1-\hat{w})^2SE(\hat{p}_2)^2 +(\hat{p}_1-\hat{p}_2)^2SE(\hat{w})^2\\ &=0.60^2(0.04^2)+0.40^2(0.03^2)+(0.30-0.10)^2(0.05^2)\\ &=0.000576+0.000144+0.000100\\ &=0.000820. \end{aligned} $$

The approximate standard error is \(\sqrt{0.000820}=0.02864\), in allele-frequency units. Under a normal approximation, an untruncated 95% interval is \(0.22\pm1.96(0.02864)\), or approximately 0.1639 to 0.2761. This interval is an approximate uncertainty summary for the mixture frequency, not a statement that there is a 95% probability that a fixed parameter lies in this particular computed interval.

Covariance Terms in a Two-Source Mixture

The two-source form makes the role of covariance especially clear. With \(q=wp_1+(1-w)p_2\), use the input vector \((p_1,p_2,w)\). The gradient is \((w,1-w,p_1-p_2)\), so the full first-order variance includes the covariance of the two frequency estimates and each frequency estimate with \(w\). In particular, uncertainty in \(w\) is multiplied by the squared frequency contrast: if the two source frequencies are similar, shifting the mixture proportion has less first-order effect on the resulting frequency.

Worked Example: Including Frequency and Proportion Covariances

Consider hypothetical estimates \(\hat{p}_1=0.30\), \(\hat{p}_2=0.10\), and \(\hat{w}=0.60\), with standard errors 0.04, 0.03, and 0.05. Suppose the estimated covariances are \(\widehat{\operatorname{Cov}}(\hat{p}_1,\hat{p}_2)=0.0003\), \(\widehat{\operatorname{Cov}}(\hat{p}_1,\hat{w})=0.0002\), and \(\widehat{\operatorname{Cov}}(\hat{p}_2,\hat{w})=-0.0001\). These are assumed to come from a valid joint covariance estimate. The mixture estimate remains \(0.22\), and its gradient is \((0.60,0.40,0.20)\).

The marginal-variance contributions are the same as in the previous calculation, totaling 0.000820. The covariance contributions are

$$ \begin{aligned} &2(0.60)(0.40)(0.0003) +2(0.60)(0.20)(0.0002) +2(0.40)(0.20)(-0.0001)\\ &=0.000144+0.000048-0.000016=0.000176. \end{aligned} $$

Therefore,

$$ \widehat{\operatorname{Var}}(\hat{q}_{mix})\approx0.000820+0.000176=0.000996, \qquad SE(\hat{q}_{mix})\approx\sqrt{0.000996}=0.03156. $$

Here the net covariance contribution increases the estimated variance. The negative covariance between \(\hat{p}_2\) and \(\hat{w}\) offsets part of the positive contributions, but does not outweigh them. If the covariance terms were omitted, the standard error would be understated for these inputs.

Mixture Proportions Must Sum to One

Mixture proportions are constrained: they are nonnegative and sum to one. Consequently, their covariance matrix is often singular when all \(K\) proportions are included, because a change in one or more proportions must be balanced by changes in others. Singularity is not, by itself, a problem for the quadratic-form calculation. The covariance matrix must represent the constraint, and the full gradient and covariance matrix must use consistent coordinates.

An alternative is to express one proportion as the remainder. With three sources, set \(w_3=1-w_1-w_2\), so the mixture frequency becomes \(q=p_3+w_1(p_1-p_3)+w_2(p_2-p_3)\). The derivatives with respect to the two free proportions are \(p_1-p_3\) and \(p_2-p_3\). This representation automatically respects the sum-to-one constraint and can simplify variance calculations.

Worked Example: Three Sources With Constrained Proportions

Suppose hypothetical estimated source frequencies are \((\hat{p}_1,\hat{p}_2,\hat{p}_3)=(0.20,0.40,0.10)\), with independent standard errors \((0.03,0.04,0.02)\). Estimated mixture proportions are \((\hat{w}_1,\hat{w}_2,\hat{w}_3)=(0.50,0.30,0.20)\). To account for the constraint, treat \(\hat{w}_1\) and \(\hat{w}_2\) as the free estimates, and set \(\hat{w}_3=1-\hat{w}_1-\hat{w}_2\). Suppose their variances are 0.0025 and 0.0016 and their covariance is \(-0.0005\). Assume the source-frequency estimates are independent of these proportion estimates.

The mixture estimate is

$$ \hat{q}_{mix}=0.50(0.20)+0.30(0.40)+0.20(0.10)=0.10+0.12+0.02=0.24. $$

In the constrained representation, the derivatives with respect to \(w_1\) and \(w_2\) are \(p_1-p_3=0.10\) and \(p_2-p_3=0.30\). The variance contribution from the uncertain proportions is

$$ \begin{aligned} V_w &\approx 0.10^2(0.0025)+0.30^2(0.0016) +2(0.10)(0.30)(-0.0005)\\ &=0.000025+0.000144-0.000030=0.000139. \end{aligned} $$

The source-frequency contribution, using the estimated mixture proportions as gradient coefficients, is

$$ \begin{aligned} V_p &\approx 0.50^2(0.03^2)+0.30^2(0.04^2)+0.20^2(0.02^2)\\ &=0.000225+0.000144+0.000016=0.000385. \end{aligned} $$

By the stated independence assumption, the source-frequency and proportion contributions have no cross-covariance term. The total variance is \(0.000385+0.000139=0.000524\), giving \(SE(\hat{q}_{mix})\approx\sqrt{0.000524}=0.02289\) in allele-frequency units.

Assumptions, Interpretation, and a Common Pitfall

The delta-method result is an approximation based on local linearization. Its practical use requires estimates of the inputs and a joint covariance estimate for those same inputs. If source-frequency estimates and mixture-proportion estimates are dependent, that dependence belongs in the covariance matrix; assuming independence merely for convenience can misstate uncertainty. The standard error describes sampling variability under the specified estimation and covariance model. It does not account for sources of uncertainty that were not represented in that model.

A common mistake is to calculate only \(\sum_i\hat{w}_i^2\widehat{\operatorname{Var}}(\hat{p}_i)\), treating all mixture proportions as fixed. That reasoning is valid only when the proportions are known constants, or when their uncertainty is deliberately being excluded from the target calculation. If the proportions are estimated, their variance and relevant covariance terms must also be considered. A related mistake is to include the marginal variances but drop covariance terms without checking whether independence is justified. The correction is to define the full input vector, state the dependence assumptions, and use its joint covariance matrix.

Key takeaway: The uncertainty of a mixture-frequency estimate depends on how uncertain its source frequencies and mixture proportions are, and on how those estimates covary. The delta method combines these contributions through the gradient of the mixture formula and the joint covariance matrix.

Check Your Understanding

Answer each question by identifying the relevant inputs and explaining the uncertainty contribution.

  1. For a two-source mixture, why does uncertainty in the mixture proportion have little first-order effect when the two source frequencies are nearly equal?
  2. What covariance terms are needed when two source-frequency estimates are dependent but the mixture proportion is known exactly?
  3. In a two-source mixture, what does a positive covariance between the estimated first-source frequency and its estimated mixture proportion contribute to the delta-method variance?
  4. Why can a covariance matrix for all mixture proportions be singular without invalidating the quadratic-form calculation?
  5. A calculation includes source-frequency variances but treats estimated mixture proportions as fixed. What uncertainty has been left out?
Clinical Biostats