Tutorials › Statistical Genetics › Joint Likelihoods for Genotype and Phenotype Data

Likelihoods for Genetic Data · Tutorial 48 of 989

Joint Likelihoods for Genotype and Phenotype Data

Build and interpret joint likelihoods by combining a model for observed genotypes with a conditional model for phenotypes.

Beginner 10 min read

What You'll Learn

  • Express a joint genotype–phenotype distribution as a genotype model times a phenotype model conditional on genotype
  • Construct a likelihood for independent individuals with discrete or quantitative phenotypes
  • Distinguish conditional independence assumptions from the chain-rule factorization
  • Check whether the likelihood reflects random sampling or a design that fixes genotype counts
  • Interpret phenotype-density contributions without treating continuous observations as point probabilities

Why Model Genotype and Phenotype Together?

A genetic study may observe a genotype \(G\) and a phenotype \(Y\) for each participant. A joint likelihood describes the probability, or density, of observing both kinds of data under a specified model. It can be organized into two parts: a model for how genotypes occur and a model for phenotypes among people with each genotype.

This organization is useful because the two parts answer different questions. The genotype component describes the distribution of genotypes in the sampled population. The conditional phenotype component describes how the phenotype distribution varies across genotypes. Their product represents a joint sampling model only when those components correspond to the way the data were sampled and measured.

Definition: For genotype \(G\) and phenotype \(Y\), the joint distribution factors as \(f_{G,Y}(g,y)=f_G(g)f_{Y\mid G}(y\mid g)\). Here \(f_G\) is the probability mass function for a discrete genotype, and \(f_{Y\mid G}\) is the conditional probability mass function or density for the phenotype given that genotype. A likelihood is this joint probability or density, viewed as a function of its model parameters after the observed data are fixed.

From the Chain Rule to a Sample Likelihood

The one-person factorization is the probability chain rule: the probability of observing \(G=g\) and \(Y=y\) equals the probability of \(G=g\) multiplied by the probability of \(Y=y\) conditional on \(G=g\). It does not require genotype and phenotype to be independent. In fact, if phenotype distributions differ by genotype, they will generally be associated in the joint distribution.

For \(n\) independently sampled individuals, let the observed data be \((g_i,y_i)\), for \(i=1,\ldots,n\). If each individual follows the same joint model, the likelihood is

$$ L(\theta_G,\theta_Y) =\prod_{i=1}^{n} f_G(g_i;\theta_G) f_{Y\mid G}(y_i\mid g_i;\theta_Y). $$

The parameter \(\theta_G\) describes the genotype distribution, and \(\theta_Y\) describes the conditional phenotype model. These parameter sets may be distinct, or the model may share parameters between them. The product across individuals requires independent sampling of the pairs under the model; it is not justified merely because the data are written in separate rows.

For a discrete phenotype, its conditional contribution is a probability. For a quantitative phenotype with a continuous model, its contribution is a density evaluated at the observed value. A density can exceed one and is not the probability of observing one exact real-valued measurement. The joint likelihood for continuous data is likewise a density with respect to the relevant measurement scale.

Key distinction: The identity \(f_{G,Y}=f_G f_{Y\mid G}\) is always a factorization of a joint distribution. Whether the corresponding sample likelihood includes the genotype factor depends on the sampling design. If the analysis conditions on genotypes fixed by design, the relevant likelihood for phenotype parameters is conditional on those genotypes.

Worked Example: Joint Likelihood for Binary Phenotypes

Suppose, hypothetically, that three unrelated participants are sampled from a population. Genotypes are recorded without error as \(G=0,1,2\), with probabilities \(0.5,0.3,0.2\), respectively. The phenotype is binary, with \(Y=1\) indicating the trait. Assume the conditional risks are \(q_0=0.1\), \(q_1=0.4\), and \(q_2=0.7\), where \(q_g=P(Y=1\mid G=g)\). The sampling model assumes independent genotype–phenotype pairs and a Bernoulli phenotype conditional on genotype.

The observed data are \((G,Y)=(0,0),(1,1),(2,1)\). The genotype likelihood is

$$ L_G=(0.5)(0.3)(0.2)=0.03. $$

For a Bernoulli outcome, the conditional contribution is \(q_g^y(1-q_g)^{1-y}\). Thus the phenotype likelihood conditional on the observed genotypes is

$$ L_{Y\mid G}=(1-0.1)(0.4)(0.7)=(0.9)(0.4)(0.7)=0.252. $$

The joint likelihood is their product:

$$ L=L_G L_{Y\mid G}=(0.03)(0.252)=0.00756. $$

This is the joint probability of these particular genotype and phenotype observations under the stated model. It is not the probability that the model is true. If the genotypes had instead been fixed in advance, the conditional phenotype likelihood would still be \(0.252\), but the genotype probability factor would not describe the sampling design.

Quantitative Phenotypes: A Gaussian Conditional Model

For a quantitative phenotype, one common model specifies a Gaussian distribution within each genotype group. For example, assume \(Y_i\mid G_i=g\sim N(\mu_g,\sigma^2)\), with a genotype-specific mean \(\mu_g\) and a common variance \(\sigma^2\). This model requires the conditional phenotype distribution to be Gaussian with the stated mean and variance; it also assumes the observations are independent across individuals under the sampling model. The genotype factor is still a probability for the observed genotype.

The conditional contribution for an observed value \(y_i\) is the Gaussian density

$$ f_{Y\mid G}(y_i\mid g_i) =\frac{1}{\sqrt{2\pi\sigma^2}} \exp\left\{-\frac{(y_i-\mu_{g_i})^2}{2\sigma^2}\right\}. $$

Worked Example: Combining Genotype Probabilities and Gaussian Densities

Consider three hypothetical, independently sampled individuals with observed pairs \((G,Y)=(0,0),(1,1),(2,3)\). Assume genotype probabilities \(P(G=0)=3/8\), \(P(G=1)=1/16\), and \(P(G=2)=9/16\). They are valid probabilities because \(3/8+1/16+9/16=1\). For the phenotype model, assume \(Y\mid G=g\sim N(\mu_g,1)\), with \(\mu_0=0\), \(\mu_1=1\), and \(\mu_2=2\). This specifies a Gaussian conditional distribution with variance one phenotype-unit squared for every genotype.

The genotype contribution is

$$ L_G=\left(\frac{3}{8}\right)\left(\frac{1}{16}\right)\left(\frac{9}{16}\right) =\frac{27}{2048}=0.01318359375. $$

For the first two phenotypes, the observations equal their genotype-specific means. Each density is \(1/\sqrt{2\pi}\approx0.3989422804\). For the third, the observation is one unit above its mean, so the density is \((1/\sqrt{2\pi})\exp(-1/2)\approx0.2419707245\). Therefore, using the unrounded densities,

$$ L_{Y\mid G} =(0.3989422804)(0.3989422804)(0.2419707245) \approx 0.0385108 \approx 0.03851. $$

The joint likelihood is

$$ L=(0.01318359375)(0.0385108) \approx 0.000507711 \approx 0.0005077. $$

The phenotype contribution is a product of three densities, not the probability of observing those exact three real numbers. Its units are inverse phenotype units cubed; the genotype contribution is dimensionless. The calculation evaluates the likelihood at the specified model values. It does not by itself establish that the Gaussian assumptions fit a real data set.

When Does the Factorization Match the Sampling Process?

The two factors can be multiplied as a likelihood for the observed pairs when the study samples individuals according to the modeled genotype distribution and then observes each phenotype under the modeled conditional distribution. The factorization itself follows from the chain rule, but a likelihood must also reflect how individuals entered the data. In particular, the genotype probabilities are not automatically part of every analysis involving genotypes and phenotypes.

Suppose a study deliberately recruits a fixed number of people from each genotype group. The genotype counts are then set by the design rather than generated as a random sample from \(f_G\). To estimate phenotype parameters in that design, the natural likelihood conditions on the observed genotypes and uses the conditional phenotype contributions. Multiplying by a genotype probability model would describe a different sampling process unless the study also modeled how the genotype groups were selected.

Similarly, if participants are selected based on phenotype status, the observed sample may not have the population distribution of \(G\) and \(Y\). A population joint likelihood cannot be applied to such a selected sample without accounting for the selection mechanism or conditioning appropriately. A model for \(P(Y\mid G)\) may still be useful, but the sampling design determines which probability factors are represented by the observed data.

A further assumption in the simple product is that the recorded genotype is the genotype variable being modeled. If genotype calls are uncertain or error-prone, the observed call and the underlying genotype are not interchangeable: a measurement model is needed to connect them. The simple factorization here treats genotype categories as observed without error.

Worked Example: Genotype Groups Fixed by Design

Imagine a hypothetical study that recruits exactly two individuals from each of the three genotype groups. Their binary outcomes are \(0,0\) for \(G=0\), \(0,1\) for \(G=1\), and \(1,1\) for \(G=2\). Assume the conditional risks are \(q_0=0.1\), \(q_1=0.4\), and \(q_2=0.8\), with independent Bernoulli outcomes conditional on genotype. Because the design fixes the genotype counts, the phenotype likelihood conditional on the recruited genotypes is the relevant likelihood for these risks.

The contributions for the first group are \((1-0.1)^2=0.9^2=0.81\). For the second group, the observed outcomes are one zero and one one, giving \((1-0.4)(0.4)=0.6(0.4)=0.24\). For the third group, both outcomes are one, giving \(0.8^2=0.64\). Thus

$$ L_{Y\mid G}=(0.81)(0.24)(0.64)=0.124416. $$

This conditional likelihood does not include a factor for the six genotypes, because their group counts were fixed by recruitment. If, instead, the six genotypes had been randomly sampled from a population with probabilities \((0.2,0.5,0.3)\), the genotype contribution for two observations of each genotype would be

$$ L_G=(0.2)^2(0.5)^2(0.3)^2=0.0009, \qquad L=L_G L_{Y\mid G}=(0.0009)(0.124416)=0.0001119744. $$

These likelihoods answer different sampling-model questions. The second includes the probability of the observed genotype sequence under random population sampling; the first conditions on the genotype allocation made by the study.

A Short Justification and a Practical Check

The sample factorization can be verified directly. For each individual, the chain rule gives \(f_{G,Y}(g_i,y_i)=f_G(g_i)f_{Y\mid G}(y_i\mid g_i)\). If the sampled pairs are independent, their joint density or probability is the product of their individual joint contributions. Substituting the chain-rule identity into each contribution yields

$$ \begin{aligned} L &=\prod_{i=1}^{n}f_{G,Y}(g_i,y_i)\\ &=\prod_{i=1}^{n}\left\{f_G(g_i)f_{Y\mid G}(y_i\mid g_i)\right\}\\ &=\left\{\prod_{i=1}^{n}f_G(g_i)\right\} \left\{\prod_{i=1}^{n}f_{Y\mid G}(y_i\mid g_i)\right\}. \end{aligned} $$

The last line is an algebraic separation of the genotype and conditional phenotype contributions. It does not assert that \(G\) and \(Y\) are independent, nor that the two likelihood factors are statistically independent. For a valid application, check both the probability model and the design: are genotypes random under the sampling plan, are phenotype distributions correctly specified conditional on genotype, and are individuals independent as assumed?

Common Mistake

A frequent error is to see two factors in the likelihood and conclude that genotype and phenotype are independent. That would incorrectly replace \(f_{Y\mid G}(y\mid g)\) by a marginal phenotype distribution \(f_Y(y)\), discarding the dependence of phenotype on genotype. The correct factorization retains the observed genotype in the conditional phenotype term. Another error is to include \(f_G(g)\) automatically even when genotype counts were fixed by design. The correction is to state the sampling process first, then include only the probability contributions that the design actually generates.

Key takeaway: A joint genotype–phenotype likelihood is the product of a genotype contribution and a phenotype contribution conditional on genotype when that product matches the sampling model. The chain rule gives the factorization; sampling assumptions determine whether the genotype component belongs in the likelihood for the study.

Check Your Understanding

Use the definitions and sampling distinctions in this tutorial to answer the following.

  1. For one individual, write the joint probability of genotype \(G=g\) and phenotype \(Y=y\) using a genotype distribution and a conditional phenotype distribution.
  2. Why does the chain-rule factorization not imply that genotype and phenotype are independent?
  3. A continuous phenotype is modeled with a Gaussian distribution conditional on genotype. Is the density evaluated at an observed value the probability of that exact value? Explain.
  4. A study recruits the same number of participants from each genotype group by design. Which likelihood component is appropriate for estimating conditional phenotype risks, and why?
  5. What additional sampling assumption permits a joint likelihood for \(n\) individuals to be written as a product of individual contributions?
Clinical Biostats