Tutorials › Statistical Genetics › Deriving Wakefield’s Approximate Bayes Factor

Bayesian Statistical Fine-Mapping · Tutorial 619 of 989

Deriving Wakefield’s Approximate Bayes Factor

Learn how to derive and calculate Wakefield’s approximate Bayes factor from an estimated variant effect, its standard error, and a specified normal prior variance.

Advanced 11 min read

What You'll Learn

  • State the null and alternative models used for a variant-level Bayes factor.
  • Derive the marginal likelihood under a zero-centred normal effect prior.
  • Convert the result between effect-and-standard-error and Z-statistic forms.
  • Calculate Wakefield’s approximate Bayes factor from hypothetical summary statistics.
  • Explain how the prior variance and standard-error scale affect the calculation.
  • Distinguish a Bayes factor from a posterior probability of causality.

Why Integrate Over an Effect Prior?

A variant’s association estimate gives evidence about a genetic effect, but a fine-mapping Bayes factor compares two models rather than reporting an association test alone. Under the null model, the variant has no effect on the phenotype. Under the alternative, it has a nonzero effect whose plausible values are described by a prior distribution. The Bayes factor measures how well the observed estimate is predicted by the alternative model relative to the null model.

Wakefield’s approximate Bayes factor (ABF) is useful when the available information is an estimated effect and its standard error. The key operation is to average the likelihood over a normal prior for the effect. This tutorial derives that calculation, gives two equivalent forms of the result, and works through hypothetical numerical examples. The Bayes factor is evidence comparing the specified models; it is not itself the probability that the variant is causal.

Definition: Let \(\hat{\beta}\) be an estimated effect for one variant, with standard error \(SE\). Write \(V=SE^2\) for the sampling variance of the estimate, and let \(\beta\) denote the underlying effect. Under the null model \(H_0\), \(\beta=0\). Under the alternative \(H_1\), assume \(\beta\sim N(0,W)\), where \(W\) is a specified prior variance. Wakefield’s ABF, in the direction used here, is the marginal density of \(\hat{\beta}\) under \(H_1\) divided by its density under \(H_0\).

The effect scale must be the same in all parts of the calculation. For example, if \(\hat{\beta}\) is a log-odds effect per additional copy of an allele, then \(SE\) is on the log-odds scale and \(W\) is a variance on the squared log-odds scale. The prior is centred at zero and assigns effect sizes symmetrically in the two directions.

Model and Derivation

The summary-statistic likelihood is approximated by a normal sampling model:

$$ \hat{\beta}\mid\beta \sim N(\beta,V), \qquad V=SE^2. $$

For the ABF calculation, the standard error is treated as fixed. Under \(H_0\), setting \(\beta=0\) gives \(\hat{\beta}\mid H_0\sim N(0,V)\). Under \(H_1\), the normal prior is \(\beta\sim N(0,W)\). The marginal distribution under \(H_1\) averages the sampling distribution over all effect values allowed by that prior.

One way to obtain this marginal distribution is to represent the estimate as \(\hat{\beta}=\beta+\varepsilon\), where \(\varepsilon\sim N(0,V)\) is sampling error independent of \(\beta\). Since independent normal variables add to a normal variable, the prior distribution of \(\beta\) and the sampling error together imply \(\hat{\beta}\mid H_1\sim N(0,W+V)\). Thus, the two models give normal densities with the same mean, zero, but different variances.

1
Write the two densities.
Under \(H_0\), the variance is \(V\); under \(H_1\), integrating over the prior gives variance \(V+W\).
2
Take their ratio.
Divide the alternative density at the observed \(\hat{\beta}\) by the null density at that same estimate.
3
Simplify.
Cancel the common normal-density constant and collect the variance and exponential terms.

In full, the ratio is

$$ BF_{10} = \frac{(2\pi(V+W))^{-1/2} \exp\!\left(-\frac{\hat{\beta}^{\,2}}{2(V+W)}\right)} {(2\pi V)^{-1/2} \exp\!\left(-\frac{\hat{\beta}^{\,2}}{2V}\right)} = \sqrt{\frac{V}{V+W}}\, \exp\!\left(\frac{\hat{\beta}^{\,2}W}{2V(V+W)}\right). $$

The last exponent follows by subtracting the two log-density exponents: \(\hat{\beta}^{\,2}/(2V)-\hat{\beta}^{\,2}/(2(V+W)) =\hat{\beta}^{\,2}W/[2V(V+W)]\). This is the effect-and-standard-error form of Wakefield’s ABF. It is positive, as expected for this direction of comparison, and can be less than or greater than one. Values above one favour \(H_1\) over \(H_0\) for the specified models; values below one favour \(H_0\).

The Z-Statistic Form

Define \(Z=\hat{\beta}/SE\), and define the dimensionless quantity \(r=W/(W+V)\). Since \(V=SE^2\), we have \(\hat{\beta}^{\,2}/V=Z^2\) and \(V/(V+W)=1-r\). Substituting these identities into the effect-scale expression gives a compact form:

$$ BF_{10} = \sqrt{1-r}\, \exp\!\left(\frac{rZ^2}{2}\right), \qquad r=\frac{W}{W+SE^2}. $$

The two forms are algebraically equivalent, not separate approximations. The effect-scale form makes the units and variance inputs explicit; the Z-statistic form highlights the role of the standardized association signal. The value of \(r\) is between zero and one when \(W>0\) and \(V>0\). It describes the relative size of the prior variance compared with the combined prior and sampling variance.

The exponential term grows as \(|Z|\) increases, so estimates farther from zero can provide more evidence for the alternative. The square-root factor reflects the relative spread of the alternative’s marginal distribution. Consequently, evidence does not depend on the Z-statistic alone: for a given \(Z\), the ABF also depends on the chosen \(W\). The prior variance is part of the model specification, not a quantity that can be omitted from the calculation.

Worked Example: Calculating the ABF From an Effect Estimate

Suppose a hypothetical association analysis estimates an allele effect of \(\hat{\beta}=0.12\) phenotype units per allele, with \(SE=0.04\) phenotype units per allele. Let the specified prior variance be \(W=0.01\) in squared phenotype units per allele. Assume the estimate’s likelihood is adequately approximated by the normal model above, and treat its standard error as fixed.

First, \(V=SE^2=(0.04)^2=0.0016\). The effect-scale formula gives

$$ BF_{10} = \sqrt{\frac{0.0016}{0.0016+0.01}}\, \exp\!\left( \frac{(0.12)^2(0.01)} {2(0.0016)(0.0016+0.01)} \right). $$

The square-root factor is \(\sqrt{0.0016/0.0116}=0.3713907\). The exponent is \(0.000144/0.00003712=3.8793103\), so the ABF is approximately \(0.3713907\exp(3.8793103)=17.97\). Equivalently, \(Z=0.12/0.04=3\) and \(r=0.01/0.0116=0.86206897\), giving the same value from the Z form. For the specified prior and null, the observed estimate is about 17.97 times as well supported by the alternative marginal model as by the null model. This is not a posterior probability of causality.

Worked Examples and Interpretation

The next examples illustrate that the same computation can yield different evidence even when the effect estimates look similar. Each calculation uses a hypothetical estimate, its standard error, and an explicitly specified prior variance on the matching effect scale.

Worked Example: A Smaller Standardized Association

Suppose a hypothetical variant has \(\hat{\beta}=0.06\) units per allele and \(SE=0.03\) units per allele. Use \(W=0.01\) squared units per allele. The normal-likelihood approximation and fixed-standard-error assumption are taken to hold for this calculation.

Here, \(V=(0.03)^2=0.0009\), \(Z=0.06/0.03=2\), and \(r=0.01/(0.01+0.0009)=0.9174312\). Therefore,

$$ BF_{10} = \sqrt{1-0.9174312}\, \exp\!\left(\frac{0.9174312(2^2)}{2}\right) \approx 0.28735\,\exp(1.83486) \approx 1.800. $$

For this prior and null model, the data favour the alternative marginal model by about 1.80 to 1. That is much less evidence than in the preceding example. It would be incorrect to call this an 80% probability that the variant is causal: a Bayes factor is a ratio of model likelihoods, and a posterior probability also requires prior odds and a defined model space.

Worked Example: How the Prior Variance Changes the ABF

Consider a hypothetical estimate \(\hat{\beta}=0.05\) units per allele with \(SE=0.02\) units per allele. Thus \(V=(0.02)^2=0.0004\) and \(Z=2.5\). First use a prior variance \(W=0.0004\), also in squared units per allele. Then \(r=0.0004/(0.0004+0.0004)=0.5\), so

$$ BF_{10} = \sqrt{1-0.5}\, \exp\!\left(\frac{0.5(2.5^2)}{2}\right) = 0.707107\,\exp(1.5625) \approx 3.373. $$

Now, holding the estimate and standard error fixed, use a broader prior with \(W=0.04\) squared units per allele. This gives \(r=0.04/(0.04+0.0004)=0.990099\), and

$$ BF_{10} = \sqrt{1-0.990099}\, \exp\!\left(\frac{0.990099(2.5^2)}{2}\right) \approx 0.099504\,\exp(3.09406) \approx 2.196. $$

Both ABFs favour the alternative relative to the null, but the numerical evidence differs because the prior distributions differ. A broader prior spreads alternative-model probability across a wider range of effects; an estimate of a particular size need not be as concentrated under that model. These results compare each specified alternative with the same null, not the two priors directly.

Conditions, Use, and a Common Pitfall

The derivation relies on a normal approximation to the sampling distribution of \(\hat{\beta}\), a standard error that can be treated as fixed, and a normal prior \(N(0,W)\) under the alternative. The effect estimate and prior variance must refer to the same variant, phenotype, adjustment model, and effect scale. For example, a variance specified for log-odds effects cannot be inserted into a calculation whose effect estimate is measured in a different scale. If the likelihood is notably non-normal, the standard error is poorly estimated, or the effect parameter is on a scale where this approximation is unsuitable, the ABF may not accurately represent the desired likelihood ratio.

The word “approximate” is important: the method uses a normal likelihood for the estimated effect and plugs in the reported standard error. When that likelihood approximation is suitable, the integral over the normal prior has the closed form derived above. The calculation is variant-level and uses the supplied effect estimate and uncertainty; it does not by itself account for uncertainty over causal-variant configurations or produce a locus-wide posterior distribution.

  • Common mistake: “The ABF is 17.97, so there is a 17.97 probability—or a 94.7% probability—that the variant is causal.” This treats a likelihood ratio as a probability.
  • Correction: The ABF is a ratio of marginal likelihoods under two specified models. Posterior odds require multiplying the Bayes factor by prior odds, and a posterior probability requires a defined set of competing possibilities.
  • Common mistake: Substituting an effect estimate and standard error but leaving out \(W\), or using a prior variance on a different effect scale.
  • Correction: State the prior variance and confirm its units match the square of the effect scale before evaluating the formula.
Key takeaway: Wakefield’s ABF is obtained by integrating a normal likelihood over a zero-centred normal effect prior and dividing by the null likelihood. With \(V=SE^2\), it is \(BF_{10}=\sqrt{V/(V+W)}\exp\{\hat{\beta}^{\,2}W/[2V(V+W)]\}\); its value depends on both the observed estimate and the specified prior variance.

Check Your Understanding

Try these questions using the definitions and formulas above.

  1. Under the null model, what distribution does \(\hat{\beta}\) have when its sampling variance is \(V\)? Under the normal-prior alternative, what is its marginal variance?
  2. For \(\hat{\beta}=0.08\), \(SE=0.04\), and \(W=0.0016\), calculate \(V\), \(Z\), and \(r\). Then write the Z-form ABF before evaluating it.
  3. Why must the units of \(W\) be the square of the units used for \(\hat{\beta}\)?
  4. If an ABF exceeds one, what does that say about the two specified models, and what does it not say by itself?
  5. For fixed \(Z\), explain why changing \(W\) can change the ABF.
Clinical Biostats