Lably
Skip to content

Bayes factor

Ratio of competing statistical models

  • 5 min read
  • 3 chapters

Related on Lably

Through Statistical hypothesis test, Likelihood function and Bayes' theorem

Although conceptually simple, the computation of the Bayes factor can be challenging depending on the complexity of the model and the hypotheses. Since closed-form expressions of the marginal likelihood are generally not available, numerical approximations based on MCMC samples have been suggested. For certain special cases, simplified algebraic expressions can be derived; for instance, the Savage–Dickey density ratio in the case of a precise (equality constrained) hypothesis against an unrestricted alternative. Another approximation, derived by applying Laplace's approximation to the integrated likelihoods, is known as the Bayesian information criterion (BIC); in large data sets the Bayes factor will approach the BIC as the influence of the priors wanes. In small data sets, priors generally matter and must not be improper since the Bayes factor will be undefined if either of the two integrals in its ratio is not finite.

Definition

The Bayes factor is the ratio of two marginal likelihoods; that is, the likelihoods of two statistical models integrated over the prior probabilities of their parameters.

The posterior probability Pr(M|D) of a model M given data D is given by Bayes' theorem:

Pr(M|D)=Pr(D|M)Pr(M)Pr(D).

The key data-dependent term Pr(D|M) represents the probability that some data are produced under the assumption of the model M; evaluating it correctly is the key to Bayesian model comparison.

Given a model selection problem in which one wishes to choose between two models on the basis of observed data D, the plausibility of the two different models M1 and M2, parametrised by model parameter vectors θ1 and θ2, is assessed by the Bayes factor K given by

K=Pr(D|M1)Pr(D|M2)=∫Pr(θ1|M1)Pr(D|θ1,M1)dθ1∫Pr(θ2|M2)Pr(D|θ2,M2)dθ2=Pr(M1|D)Pr(D)Pr(M1)Pr(M2|D)Pr(D)Pr(M2)=Pr(M1|D)Pr(M2|D)Pr(M2)Pr(M1).

When the two models have equal prior probability, so that Pr(M1)=Pr(M2), the Bayes factor is equal to the ratio of the posterior probabilities of M1 and M2. If instead of the Bayes factor integral, the likelihood corresponding to the maximum likelihood estimate of the parameter for each statistical model is used, then the test becomes a classical likelihood-ratio test. Unlike a likelihood-ratio test, this Bayesian model comparison does not depend on any single set of parameters, as it integrates over all parameters in each model (with respect to the respective priors). An advantage of the use of Bayes factors is that it automatically, and quite naturally, includes a penalty for including too much model structure. It thus guards against overfitting. For models where an explicit version of the likelihood is not available or too costly to evaluate numerically, approximate Bayesian computation can be used for model selection in a Bayesian framework, with the caveat that approximate-Bayesian estimates of Bayes factors are often biased.

Other approaches are:

  • to treat model comparison as a decision problem, computing the expected value or cost of each model choice;
  • to use minimum message length (MML).
  • to use minimum description length (MDL).

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Statistics