Why Compare Models With a Bayes Factor?
Fine-mapping asks which variant, if any, best accounts for an observed genetic association. A variant with a strong association statistic may be compatible with a causal effect, but the statistic alone is not the probability that the variant is causal. A Bayes factor gives a way to compare the data’s support for two specified models: a model in which the variant has a causal effect and a null model in which it does not. Combining that evidence with prior odds yields posterior odds.
The earlier material on the single-causal-variant posterior used prior weights and variant evidence to describe uncertainty across candidate variants. Here the focus is the meaning and calculation of the evidence factor itself, and how to interpret its combination with prior odds. A Bayes factor is conditional on the models being compared; it does not remove the need to specify what “causal” and “null” mean in the analysis.
If a model has an unknown effect parameter, its marginal likelihood averages the data likelihood over that model’s prior distribution for the parameter. For example, if \(\theta\) is the variant’s effect under \(H_1\) and its prior density is \(\pi_1(\theta)\), then
The null model may also contain nuisance parameters, which are handled by specifying and integrating over them in the same general way. Thus, a Bayes factor compares the probability of the observed data under two fully specified models, including their parameter priors. It is not generally the ratio of the likelihoods at the two models’ best-fitting parameter values.
From Prior Odds to Posterior Odds
The Bayes factor measures how the data change the odds between two models. Prior odds encode their relative plausibility before observing \(D\); posterior odds encode their relative plausibility after observing \(D\). The relationship follows directly from Bayes’ rule.
This result separates two sources of a posterior conclusion. The Bayes factor records how the data discriminate between the models; prior odds record how plausible the models were before those data were observed. A large Bayes factor can still yield modest posterior probability when prior odds strongly favour the null. Conversely, evidence that is only moderately greater under \(H_1\) can produce notable posterior odds when the prior already favours \(H_1\).
Worked Example: Averaging Likelihoods Under a Causal Model
Suppose a hypothetical analysis observes data \(D\) for one candidate variant. Under \(H_1\), the effect \(\theta\) has a two-point prior: \(\theta=-0.2\) or \(\theta=0.2\), each with probability \(0.5\). The likelihoods are \(P(D\mid \theta=-0.2,H_1)=0.001\) and \(P(D\mid \theta=0.2,H_1)=0.003\). Under \(H_0\), \(P(D\mid H_0)=0.00005\). Find the Bayes factor.
The marginal likelihood under \(H_1\) is the prior-weighted average of the two likelihoods:
Therefore,
For these specified models and priors, the observed data are 40 times as probable under the causal model’s marginal likelihood as under the null model. This is a comparison of data probabilities under models, not a statement that the causal model has probability 40 or that the variant has a 40-fold probability of being causal.
Worked Posterior-Odds Calculations
Worked Example: Strong Evidence With a Low Prior Probability
Suppose a hypothetical variant has prior probability \(P(H_1)=0.01\), and a model comparison gives \(BF_{10}=40\). Calculate the posterior odds and posterior probability of \(H_1\).
The prior odds are \(0.01/(1-0.01)=0.01/0.99=1/99\). Multiplying by the Bayes factor gives
Converting those odds to a probability gives
The posterior probability is approximately 28.78% under these assumptions. Although the data favour the causal model over the null by a factor of 40, the low prior probability means that the posterior probability is not close to 1.
Worked Example: Moderate Evidence and a Different Prior
For another hypothetical variant, suppose the prior probability of a causal effect is \(0.05\) and \(BF_{10}=2.4\). Calculate the updated odds and probability.
The prior odds are \(0.05/0.95=1/19\). The posterior odds are
The posterior probability is
The posterior probability is approximately 11.21%. The Bayes factor indicates that these data are 2.4 times as probable under \(H_1\) as under \(H_0\); it does not indicate that the posterior probability is 2.4 times the prior probability. Odds, rather than probabilities, multiply directly by the Bayes factor.
Comparing Candidate Variants
When considering several mutually exclusive possibilities, each candidate variant’s Bayes factor is usually defined against the same null model and based on the same observed data. The posterior weight for a candidate is proportional to its prior model probability multiplied by its Bayes factor. Comparing two candidates \(H_{1A}\) and \(H_{1B}\), their posterior odds are their prior odds multiplied by the ratio \(BF_{A0}/BF_{B0}\). A larger Bayes factor does not by itself guarantee a larger posterior probability if the candidates have different prior probabilities.
Worked Example: Comparing Two Candidate Variants
Consider three mutually exclusive models for hypothetical data: variant A is causal, variant B is causal, or neither candidate is causal (the null model). Assign prior probabilities \(0.02\), \(0.01\), and \(0.97\), respectively. Suppose \(BF_{A0}=15\) and \(BF_{B0}=5\). Find the posterior probabilities.
Relative to the null, the prior-weighted evidence weights are \(0.02(15)=0.30\) for A, \(0.01(5)=0.05\) for B, and \(0.97(1)=0.97\) for the null. Their sum is \(0.30+0.05+0.97=1.32\). Normalising gives
The posterior odds of A against B are \(0.30/0.05=6\). This also follows from prior odds \(0.02/0.01=2\) multiplied by the Bayes-factor ratio \(15/5=3\), giving \(2(3)=6\). A has the greater posterior probability here, but the data still leave substantial posterior probability on the null model.
Assumptions, Diagnostics, and Alternatives
A Bayes factor is meaningful only relative to the models and prior distributions used to calculate it. The likelihoods must describe the same observed data and use compatible treatment of nuisance parameters. The causal and null models must be clearly specified: for example, the comparison may concern a nonzero effect at the candidate variant versus an effect of zero, conditional on a particular genetic and phenotype model. If the data or likelihood is misspecified, the resulting Bayes factor may not provide a reliable comparison for the scientific question.
The prior under a composite causal model matters because the marginal likelihood averages over effect values. If the prior assigns substantial weight to values that predict data unlike what was observed, those values contribute to the average and can reduce the Bayes factor. This dependence is not a computational defect: it is part of comparing the specified models. It does mean that a Bayes factor should be reported with enough information about the effect prior and model assumptions for its interpretation to be clear.
Useful checks include confirming the direction and coding of the effect allele, verifying that the same data and conditioning choices enter both models, and checking that the prior probabilities across mutually exclusive models are coherent. When marginal likelihoods are extremely small, calculations on the log scale help avoid numerical underflow: \(\log BF_{10}=\log m_1(D)-\log m_0(D)\). A value of \(\log BF_{10}=0\) corresponds to \(BF_{10}=1\), which means equal marginal likelihoods; a positive value favours \(H_1\), and a negative value favours \(H_0\).
A Bayes factor differs from a \(p\)-value. A \(p\)-value is a probability of data at least as incompatible with a null model as the observed data, calculated assuming that null model; it is not a comparison of the null model’s probability with the causal model’s probability. A maximum-likelihood ratio compares best-fitting likelihood values, whereas a Bayes factor compares marginal likelihoods and incorporates parameter priors. Posterior probabilities go further by combining Bayes factors with prior model probabilities.
A further limitation is that a large Bayes factor only favours one model relative to the particular alternative used in its denominator. It does not establish that the variant is the unique biological cause, rule out other causal variants, or protect against errors in the data or model. Interpret it as evidence within a stated comparison, not as a universal measure of causal certainty.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- If \(m_1(D)=0.006\) and \(m_0(D)=0.0003\), what is \(BF_{10}\), and which model does the data favour?
- A candidate has prior probability \(0.10\) and \(BF_{10}=3\). Calculate its posterior probability.
- Why can a Bayes factor not be interpreted directly as the posterior probability that a variant is causal?
- Two candidates have equal prior probabilities and Bayes factors 8 and 2 against the same null model. What are their posterior odds relative to one another?
Solutions. (1) \(BF_{10}=0.006/0.0003=20\), so the data are 20 times as probable under \(H_1\) as under \(H_0\). (2) Prior odds are \(0.10/0.90=1/9\); posterior odds are \(3/9=1/3\), giving posterior probability \((1/3)/(1+1/3)=0.25\). (3) The Bayes factor is a ratio of marginal likelihoods, not a probability for either model; posterior probability also depends on prior model probabilities. (4) Equal prior probabilities give prior odds of 1, and the Bayes-factor ratio is \(8/2=4\), so the first candidate has posterior odds of 4 to 1 against the second.