Tutorials › Statistical Genetics › Common Errors in Genetic Likelihood Construction

Likelihoods for Genetic Data · Tutorial 59 of 989

Common Errors in Genetic Likelihood Construction

Check what was observed, what was conditioned on, and which observations are genuinely independent before multiplying genetic likelihood contributions.

Beginner 9 min read

What You'll Learn

  • Distinguish a genotype likelihood from a posterior genotype probability
  • Recognize when allele-copy information has been counted more than once
  • Decide whether observations factor into independent likelihood contributions
  • Construct a likelihood conditional on sample ascertainment
  • Diagnose how these errors can distort estimates and uncertainty

Why Likelihood Construction Needs Care

A likelihood is built from a probability model for the data that were actually observed. In genetic analyses, it is easy to substitute a related but different quantity: a posterior probability of a genotype, a probability for allele copies already represented in a genotype call, or an unconditional probability for data collected through a selection process. Each substitution can change the likelihood and therefore alter estimates, uncertainty, or conclusions.

The key check is to write down the observed data and the conditioning information before multiplying probabilities. Let \(D\) denote observed data, \(G\) a genotype, and \(\theta\) the unknown model parameter or parameter vector. The likelihood is the probability of the observed data as a function of \(\theta\). A posterior genotype probability is a probability about \(G\) after combining data with a genotype distribution. These quantities answer different questions.

Definition: A likelihood for observed data \(D\) is \(L(\theta;D)=P(D\mid\theta)\), viewed as a function of \(\theta\) with \(D\) fixed. A genotype posterior is \(P(G\mid D)\); it summarizes uncertainty about \(G\) after using both the data model and a prior or population distribution for \(G\). A likelihood contribution may be multiplied by another contribution only when the required independence or conditional-independence assumption is justified.

Error 1: Treating a Genotype Posterior as a Likelihood

For uncertain genotype calls, the probability of the read data under each possible genotype is a genotype-specific likelihood, such as \(P(D\mid G=g)\). A genotype posterior instead combines those read likelihoods with genotype prior probabilities:

$$ P(G=g\mid D)=\frac{P(D\mid G=g)P(G=g)}{\sum_{g'}P(D\mid G=g')P(G=g')}. $$

The posterior is normalized across genotype states and depends on the genotype prior. If it is then used as though it were the read likelihood in a second model, the prior may be counted again. This can distort inference about allele frequencies or other parameters that determine genotype probabilities. The issue is not that posterior probabilities are unusable; it is that their role must be stated and the model must account for the prior already included.

Worked Example: Recovering the Read Likelihood From a Genotype Posterior

Suppose a hypothetical diploid sample has possible genotypes \(AA\), \(Aa\), and \(aa\), with prior probabilities \(0.25\), \(0.50\), and \(0.25\). For a read observation \(D\), suppose the genotype-specific read likelihoods are \(0.10\), \(0.80\), and \(0.20\), respectively. These values are probabilities of this observed read outcome under each genotype.

The unnormalized posterior weights are \(0.10(0.25)=0.025\), \(0.80(0.50)=0.400\), and \(0.20(0.25)=0.050\). Their sum is \(0.475\). Thus:

$$ P(G=AA\mid D)=\frac{0.025}{0.475}=0.05263,\quad P(G=Aa\mid D)=\frac{0.400}{0.475}=0.8421,\quad P(G=aa\mid D)=\frac{0.050}{0.475}=0.1053. $$

The posterior probability of \(Aa\) is \(0.8421\), but the likelihood of the read data under \(Aa\) is \(P(D\mid G=Aa)=0.80\). They are not interchangeable. For example, a model that needs \(P(D\mid G)\) must use \(0.10, 0.80, 0.20\), not the three posterior probabilities. If genotype probabilities depend on an unknown parameter, use the appropriate likelihood and genotype distribution together, or use a posterior-based procedure whose construction explicitly avoids reusing the prior.

Error 2: Counting Allele Evidence Twice

A diploid genotype contains two allele copies, but that does not mean every genotype-level observation supplies two independent copies of the same evidence. The probability model must match the recorded observation. Under a simple model in which the two alleles are independent draws with allele-\(A\) frequency \(p\), an unordered genotype has probabilities \(p^2\) for \(AA\), \(2p(1-p)\) for \(Aa\), and \((1-p)^2\) for \(aa\). The factor of two for a heterozygote accounts for the two possible orders of its allele draws.

If the data are genotype calls, the genotype probability is one likelihood contribution per individual. Squaring that contribution as though the same call had been observed twice duplicates evidence. If the data are allele-specific observations, a model for the two copies can be appropriate, but it must reflect how the copies were observed and must not also multiply in a likelihood for the genotype call derived from those same observations.

Worked Example: Avoiding a Duplicate Genotype Contribution

Consider one hypothetical individual called \(Aa\). Under the independent-allele model, the probability of the unordered genotype is \(2p(1-p)\). Compare \(p=0.50\) with \(p=0.25\).

The correct likelihood ratio for this one genotype, comparing \(p=0.50\) to \(p=0.25\), is:

$$ \frac{2(0.50)(0.50)}{2(0.25)(0.75)} =\frac{0.50}{0.375} =1.333. $$

If the same genotype call is mistakenly counted twice, the ratio becomes \(1.333^2=1.778\). The second calculation acts as though two independent \(Aa\) genotype observations were available. Only one individual was observed, so the squared ratio overstates the evidence favoring \(p=0.50\). The same principle applies when a genotype call is constructed from read data: do not multiply the read likelihood by a second copy of evidence that is merely a restatement of those reads.

Error 3: Multiplying Dependent Observations

A product likelihood follows from an independence statement, not from the mere fact that data appear in separate columns or come from separate measurements. If observations \(D_1\) and \(D_2\) are conditionally independent given \(\theta\), then \(P(D_1,D_2\mid\theta)=P(D_1\mid\theta)P(D_2\mid\theta)\). If they share an unobserved cause, such as an uncertain genotype, the correct joint probability generally sums over that shared state rather than multiplying marginal probabilities.

For instance, read evidence and a phenotype may be independent conditional on genotype in a specified model, yet dependent marginally because both are related to genotype. The appropriate joint likelihood then averages the conditional product over possible genotypes. Multiplying the two marginal probabilities separately discards that shared uncertainty.

Worked Example: Two Observations Sharing an Uncertain Genotype

Suppose a hypothetical individual has an unobserved binary genotype state \(G\), with \(P(G=1)=q\) and \(P(G=0)=1-q\). Two binary observations \(R\) and \(Y\) are conditionally independent given \(G\). Each is positive with probability \(0.80\) when \(G=1\) and \(0.20\) when \(G=0\). We observe \(R=1\) and \(Y=1\), and consider \(q=0.50\).

Given \(G\), the probability of both positive observations is the product of the conditional probabilities. Summing over the shared genotype gives:

$$ P(R=1,Y=1\mid q=0.50) =0.50(0.80)(0.80)+0.50(0.20)(0.20) =0.320+0.020 =0.340. $$

Each marginal probability of a positive observation is \(0.50(0.80)+0.50(0.20)=0.50\). Multiplying those marginal probabilities gives \(0.50(0.50)=0.250\), which is not the joint probability. The observations are conditionally independent given \(G\), but not independent after \(G\) is averaged out. The calculation should therefore retain the shared genotype in the joint model.

Error 4: Ignoring Ascertainment

Ascertainment means that inclusion in the data depends on a characteristic or event. If the analysis uses only individuals selected by event \(A\), the probability model for their observed data must reflect that selection. The likelihood for data \(D\) among selected individuals is \(P(D\mid A,\theta)\), not automatically \(P(D\mid\theta)\). When \(D\) itself implies selection, this conditional probability is obtained by dividing the joint probability of the observed data and selection event by the probability of selection.

$$ P(D\mid A,\theta)=\frac{P(D,A\mid\theta)}{P(A\mid\theta)}. $$

The denominator can depend on \(\theta\); omitting it can therefore change the likelihood's shape and the resulting estimates. Whether an ascertainment correction is needed depends on the sampling design and on which parts of that design are already represented in the model. It is not a universal extra factor to apply without checking.

Worked Example: Genotypes Among Ascertained Cases

Suppose a hypothetical population has \(P(G=1)=q\). A phenotype \(Y=1\) occurs with probability \(0.80\) for \(G=1\) and \(0.20\) for \(G=0\). The study recruits only individuals with \(Y=1\), then records their genotype. For a recruited case, the genotype probability is conditional on being a case:

$$ P(G=1\mid Y=1,q) =\frac{P(Y=1\mid G=1)P(G=1)} {P(Y=1\mid G=1)P(G=1)+P(Y=1\mid G=0)P(G=0)} =\frac{0.80q}{0.80q+0.20(1-q)}. $$

At \(q=0.50\), the numerator is \(0.80(0.50)=0.40\), and the denominator is \(0.40+0.20(0.50)=0.50\). Therefore, \(P(G=1\mid Y=1,q=0.50)=0.40/0.50=0.80\). The unconditional joint probability \(P(G=1,Y=1)=0.40\) is not the probability of \(G=1\) among recruited cases: case status has already been fixed by the sampling rule.

If \(k\) of \(n\) independently recruited cases have \(G=1\), the genotype-count likelihood conditional on recruitment is proportional to \(r(q)^k[1-r(q)]^{n-k}\), where \(r(q)=P(G=1\mid Y=1,q)\). Using the unconditioned joint probabilities \(0.80q\) and \(0.20(1-q)\) as though they were the two genotype probabilities among cases omits their normalizing denominator. The resulting quantities do not sum to one over the genotypes of a recruited case.

A Short Derivation: Why the Ascertainment Denominator Matters

The conditional probability rule gives \(P(D\mid A,\theta)=P(D,A\mid\theta)/P(A\mid\theta)\). For \(n\) independently sampled individuals, all selected through the same event \(A\), the conditional likelihood is therefore:

$$ L_{\mathrm{selected}}(\theta;D_1,\ldots,D_n) =\prod_{i=1}^{n}\frac{P(D_i,A\mid\theta)}{P(A\mid\theta)}. $$

If each recorded \(D_i\) necessarily implies \(A\), then \(P(D_i,A\mid\theta)=P(D_i\mid\theta)\), so the likelihood becomes \(\prod_i P(D_i\mid\theta)/[P(A\mid\theta)]^n\). The denominator cannot be dropped when it varies with \(\theta\): doing so changes relative likelihood values at different parameter values. This derivation assumes independent sampling of selected individuals under the model; shared sampling mechanisms or dependence require a joint selection model instead.

A Practical Diagnostic

Before evaluating a genetic likelihood, identify the observation unit and write the probability of exactly what was recorded. Then ask whether any genotype probabilities have already been incorporated, whether one piece of data is a deterministic or near-deterministic restatement of another, and whether recruitment depended on the outcome being analyzed. These checks help distinguish a valid factorization from an accidental duplication or an omitted conditioning step.

1
Name the observed data.
Separate read counts, genotype calls, phenotypes, and selection information rather than treating them as interchangeable evidence.
2
State the conditioning.
Specify whether probabilities are conditional on genotype, on a selected sample, or on other shared variables.
3
Justify each product.
Multiply contributions only after stating the independence or conditional-independence assumption that supports the factorization.
4
Check normalization and reuse.
Confirm that conditional probabilities sum to one over possible outcomes and that the same evidence has not entered twice.

Common Mistake

Wrong reasoning: “I have a genotype posterior for each person, and each person has two alleles, so I can multiply the posterior probabilities for both allele copies and then multiply across the sample. The sample contains only cases, but their unconditioned probabilities are still the likelihood.”

Correction: A genotype posterior already combines data with genotype probabilities; it is not automatically a read likelihood. Two allele copies do not justify duplicating a genotype call, and observations sharing an uncertain genotype need a joint model that retains that shared state. Finally, a case-only sample requires probabilities conditional on the ascertainment event when the sampling design makes that conditioning relevant. Each correction follows from matching the probability model to the observations and the way they entered the study.

Key takeaway: A genetic likelihood must represent the observed data once, with the correct conditioning and dependence structure. Posterior probabilities, allele copies, correlated observations, and selected samples each require explicit attention before likelihood contributions are combined.

Check Your Understanding

Use the probability model and sampling design—not the appearance of the data table—to decide how each likelihood should be constructed.

  1. Why can a genotype posterior differ from the genotype-specific likelihood for the observed reads?
  2. Under the independent-allele model, what does the factor of two in the probability of an unordered heterozygote represent?
  3. Two observations are independent conditional on an uncertain genotype. Why might their marginal probabilities fail to multiply to their joint probability?
  4. A study recruits only phenotype-positive individuals and records genotype. Which conditional probability describes genotype among recruited participants?
  5. When can a product of per-individual likelihood contributions be justified, and what should be checked before using it?
Clinical Biostats