Tutorials › Statistical Genetics › Bayes Factors and Prior Odds for Causal Variants

Bayesian Statistical Fine-Mapping · Tutorial 618 of 989

Bayes Factors and Prior Odds for Causal Variants

Use Bayes factors to update prior odds between causal-variant hypotheses, and interpret the resulting posterior odds in fine-mapping.

Advanced 10 min read

What You'll Learn

  • Define prior odds, posterior odds, and a Bayes factor for competing variant hypotheses
  • Derive the posterior-odds update from Bayes’ theorem
  • Calculate posterior odds and probabilities from a specified Bayes factor
  • Compare variant hypotheses using Bayes factors relative to a shared alternative
  • Explain how changing prior probabilities changes posterior conclusions
  • Distinguish evidence from the data from assumptions encoded in the prior

Why Prior Odds and Bayes Factors Go Together

Fine-mapping asks which genetic variant, if any, is responsible for an association signal. Evidence from the observed data matters, but it is not the only ingredient in a Bayesian comparison: the prior probabilities assigned to the competing hypotheses matter too. A Bayes factor describes how the data compare under two hypotheses; prior odds describe how plausible those hypotheses were before seeing those data. Their product gives the posterior odds.

This tutorial focuses on that update for hypotheses about causal variants. It does not derive a particular fine-mapping Bayes factor. Instead, it explains how to combine a Bayes factor already obtained from a valid comparison with stated prior odds, and how to interpret the result without treating it as proof of causality.

Definition: Let \(H_1\) and \(H_0\) be two competing hypotheses, and let \(D\) denote the observed data. The prior odds for \(H_1\) against \(H_0\) are \(P(H_1)/P(H_0)\). The posterior odds are \(P(H_1\mid D)/P(H_0\mid D)\). The Bayes factor in favor of \(H_1\) over \(H_0\) is \(BF_{10}=P(D\mid H_1)/P(D\mid H_0)\). Thus, values of \(BF_{10}\) greater than 1 favor \(H_1\), values less than 1 favor \(H_0\), and a value of 1 means the data have equal marginal probability under the two hypotheses.

In genetic fine-mapping, \(H_1\) might state that a specified variant is causal for the locus-level association, while \(H_0\) might state that it is not causal. The precise hypotheses must be defined for the analysis at hand. In particular, “not causal” could mean no causal variant in the region, or it could mean another specified variant is causal. These are different comparisons and can have different Bayes factors.

The data probability \(P(D\mid H)\) is the probability of the observed data under a hypothesis. When a hypothesis includes unknown parameters, this is generally a marginal probability: the likelihood is averaged over the parameter values using the prior distribution specified under that hypothesis. The Bayes factor therefore depends on both the data and the model assumptions, including any parameter priors used to calculate the marginal probabilities.

Deriving the Posterior-Odds Update

Assume \(H_1\) and \(H_0\) are well-defined competing hypotheses with nonzero prior probabilities, and use the same observed data \(D\) to evaluate both. Bayes’ theorem gives \(P(H_i\mid D)=P(D\mid H_i)P(H_i)/P(D)\) for either hypothesis \(H_i\). Taking the ratio cancels the common marginal probability \(P(D)\):

$$ \frac{P(H_1\mid D)}{P(H_0\mid D)} = \frac{P(D\mid H_1)P(H_1)/P(D)} {P(D\mid H_0)P(H_0)/P(D)} = \frac{P(D\mid H_1)}{P(D\mid H_0)} \frac{P(H_1)}{P(H_0)} = BF_{10}\times \frac{P(H_1)}{P(H_0)}. $$

This is the posterior-odds identity. It says that the data multiply, rather than replace, the prior odds. If the prior odds are 1:99 and the Bayes factor is 20, then the posterior odds are 20:99. The data have shifted the comparison toward \(H_1\), but the posterior odds are still less than 1:1 because \(H_1\) began with relatively small prior odds.

Odds and probabilities are related but are not interchangeable. If the posterior odds for \(H_1\) against \(H_0\) are \(O\), then the posterior probability of \(H_1\), in a comparison where those two hypotheses are exhaustive, is \(O/(1+O)\). Equivalently, if \(p=P(H_1)\) is the prior probability, then:

$$ P(H_1\mid D) = \frac{BF_{10}p}{BF_{10}p+(1-p)}. $$

The probability conversion requires care about the comparison. If \(H_1\) and \(H_0\) are only two members of a larger set of hypotheses, their posterior odds can still be computed as a pairwise ratio, but that ratio alone does not give the overall posterior probability of \(H_1\). The other hypotheses also contribute to the total posterior probability.

Worked Example: Updating Odds for One Candidate Variant

Hypothetical setup. Suppose the hypotheses are \(H_1\): variant A is causal for the locus signal, and \(H_0\): no variant in the specified region is causal. Before examining the data, the analysis assigns \(P(H_1)=0.01\) and \(P(H_0)=0.99\). Suppose a valid marginal-likelihood comparison of hypothetical genotype and phenotype data gives \(BF_{10}=20\).

The prior odds for \(H_1\) against \(H_0\) are:

$$ \frac{P(H_1)}{P(H_0)} = \frac{0.01}{0.99} = \frac{1}{99} \approx 0.01010. $$

The posterior odds are the Bayes factor times these prior odds:

$$ \frac{P(H_1\mid D)}{P(H_0\mid D)} = 20\times\frac{1}{99} = \frac{20}{99} \approx 0.2020. $$

Because these two hypotheses are exhaustive in this example, the corresponding posterior probability of \(H_1\) is:

$$ P(H_1\mid D) = \frac{20/99}{1+20/99} = \frac{20}{119} \approx 0.1681. $$

The data are 20 times as probable under \(H_1\) as under \(H_0\), but the posterior probability of \(H_1\) is about 16.81%, not 20 or 95%. The low prior probability still matters. This posterior probability is conditional on the two stated hypotheses and their model assumptions; it is not a probability that the association is causal under every possible explanation.

Comparing Two Candidate Variants

The same update works when the hypotheses specify different candidate variants. Suppose \(H_A\) says variant A is causal and \(H_B\) says variant B is causal. The posterior odds for A against B equal their prior odds multiplied by the Bayes factor comparing A directly with B:

$$ \frac{P(H_A\mid D)}{P(H_B\mid D)} = \frac{P(D\mid H_A)}{P(D\mid H_B)} \frac{P(H_A)}{P(H_B)} = BF_{AB}\times\frac{P(H_A)}{P(H_B)}. $$

If Bayes factors are instead reported for each hypothesis against the same reference \(H_0\), their ratio supplies the pairwise Bayes factor: \(BF_{AB}=BF_{A0}/BF_{B0}\). This follows directly by dividing their likelihood ratios, so the shared reference cancels. It is important that the reference and data are genuinely the same in both comparisons.

Worked Example: Comparing Two Candidate Variants

Hypothetical setup. Consider three mutually exclusive and exhaustive hypotheses: \(H_A\), variant A is causal; \(H_B\), variant B is causal; and \(H_0\), neither candidate is causal under the specified model. Assign prior probabilities \(P(H_A)=0.02\), \(P(H_B)=0.01\), and \(P(H_0)=0.97\). For hypothetical data, suppose marginal-likelihood calculations give \(BF_{A0}=12\) and \(BF_{B0}=8\).

The pairwise Bayes factor for A against B is:

$$ BF_{AB} = \frac{BF_{A0}}{BF_{B0}} = \frac{12}{8} = 1.5. $$

The prior odds for A against B are \(0.02/0.01=2\). Therefore the posterior odds are:

$$ \frac{P(H_A\mid D)}{P(H_B\mid D)} = 1.5\times 2 = 3. $$

Thus, conditional on comparing A with B, the posterior odds favor A by 3 to 1. To show how the third hypothesis affects overall probabilities, use unnormalized posterior weights proportional to prior probability times Bayes factor relative to \(H_0\):

$$ H_A:\ 0.02\times12=0.24,\qquad H_B:\ 0.01\times8=0.08,\qquad H_0:\ 0.97\times1=0.97. $$

The weights sum to \(0.24+0.08+0.97=1.29\). Normalizing gives \(P(H_A\mid D)=0.24/1.29\approx0.1860\), \(P(H_B\mid D)=0.08/1.29\approx0.06202\), and \(P(H_0\mid D)=0.97/1.29\approx0.7519\). The ratio of the first two probabilities is \(0.1860/0.06202\approx3\), consistent with the pairwise calculation. A 3-to-1 comparison of A with B does not mean A has posterior probability 0.75 overall, because \(H_0\) remains a possible explanation.

How Prior Choices Affect the Update

A Bayes factor summarizes the relative support supplied by the data under a specified pair of models. It does not determine the posterior odds on its own. The same Bayes factor can produce quite different posterior conclusions when the prior odds differ. This is especially consequential when the prior probability for a particular variant being causal is small.

Prior probabilities should represent assumptions made before using the data being analyzed. If prior information is derived from independent biological or functional evidence, it may be reasonable to use it, provided the source and assumptions are stated. Using the same association data both to choose a prior and to calculate the Bayes factor can count that evidence twice unless the analysis explicitly accounts for the dependence.

Worked Example: The Same Bayes Factor Under Two Priors

Hypothetical setup. Suppose the two hypotheses are \(H_1\), a specified variant is causal, and \(H_0\), it is not. The same hypothetical data produce \(BF_{10}=100\). Compare two possible prior probabilities, \(P(H_1)=0.001\) and \(P(H_1)=0.05\), with \(P(H_0)=1-P(H_1)\) in each case.

With prior probability 0.001, the prior odds are \(0.001/0.999\). The posterior odds and probability are:

$$ \text{Posterior odds} = 100\times\frac{0.001}{0.999} = \frac{0.1}{0.999} \approx 0.1001, \qquad P(H_1\mid D) = \frac{0.1}{0.1+0.999} \approx 0.0910. $$

With prior probability 0.05, the prior odds are \(0.05/0.95=1/19\). The update is:

$$ \text{Posterior odds} = 100\times\frac{1}{19} = \frac{100}{19} \approx 5.263, \qquad P(H_1\mid D) = \frac{5}{5+0.95} \approx 0.8403. $$

The Bayes factor is identical in the two calculations, but the posterior probability is about 9.10% under the first prior and 84.03% under the second. The difference is due to the prior assumptions, not a change in the observed evidence. A reader should therefore inspect both the Bayes factor and the prior odds before interpreting a posterior comparison.

Interpretation and a Common Pitfall

A Bayes factor is a ratio of data probabilities under hypotheses, not a probability that either hypothesis is true. For example, \(BF_{10}=20\) means that the observed data are 20 times as probable under \(H_1\) as under \(H_0\), given the specified models and their parameter priors. It does not mean that \(H_1\) has probability 20, nor that the data have a 20% or 95% probability of being causal evidence.

Likewise, posterior odds are a comparison conditional on the hypotheses and prior probabilities used. In a fine-mapping analysis, a large posterior preference for a causal-variant hypothesis remains conditional on the association model, the treatment of other variants and hypotheses, the data quality, and the prior specification. Statistical support does not by itself establish a biological mechanism or prove that changing the variant would change the trait.

Common mistake: “The Bayes factor is 20, so the posterior probability that the variant is causal is 20/21.” This reasoning silently assumes prior odds of 1:1 and an exhaustive two-hypothesis comparison. If the prior odds are instead 1:99, the posterior odds are 20:99 and the posterior probability is \(20/119\), about 0.1681. Always multiply the Bayes factor by the actual prior odds first; convert to a probability only afterward, and only with the comparison set clearly specified.

Key takeaway: For hypotheses \(H_1\) and \(H_0\), posterior odds equal \(BF_{10}\) multiplied by prior odds. State the hypotheses, prior probabilities, Bayes factor direction, and relevant competing explanations before interpreting a fine-mapping comparison.

Check Your Understanding

Answer each question using the stated hypotheses and comparison.

  1. If the prior odds for \(H_1\) against \(H_0\) are 1:9 and \(BF_{10}=6\), what are the posterior odds?
  2. In words, what does \(BF_{10}=0.25\) say about the observed data under \(H_1\) relative to \(H_0\)?
  3. Two variants have prior odds of 4:1, and their pairwise Bayes factor is 0.5 in favor of the first variant. What are the posterior odds for the first variant against the second?
  4. Why does a pairwise posterior odds ratio of 3 not necessarily mean the first hypothesis has posterior probability 0.75 overall?
  5. What assumption is hidden in converting posterior odds \(O\) to posterior probability \(O/(1+O)\)?
Clinical Biostats