Bayes factor

As such, both quantities only coincide under simple hypotheses (e.g., two specific parameter values).

[3] Although conceptually simple, the computation of the Bayes factor can be challenging depending on the complexity of the model and the hypotheses.

[4] Since closed-form expressions of the marginal likelihood are generally not available, numerical approximations based on MCMC samples have been suggested.

[5] 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.

[6][7] Another approximation, derived by applying Laplace's approximation to the integrated likelihoods, is known as the Bayesian information criterion (BIC);[8] 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.

of a model M given data D is given by Bayes' theorem: The key data-dependent term

, is assessed by the Bayes factor K given by When the two models have equal prior probability, so that

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).

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,[11] with the caveat that approximate-Bayesian estimates of Bayes factors are often biased.

[12] Other approaches are: A value of K > 1 means that M1 is more strongly supported by the data under consideration than M2.

The fact that a Bayes factor can produce evidence for and not just against a null hypothesis is one of the key advantages of this analysis method.

An alternative table, widely cited, is provided by Kass and Raftery (1995):[10] According to I. J.

Good, the just-noticeable difference of humans in their everyday life, when it comes to a change degree of belief in a hypothesis, is about a factor of 1.3x, or 1 deciban, or 1/3 of a bit, or from 1:1 to 5:4 in odds ratio.

The likelihood can be calculated according to the binomial distribution: Thus we have for M1 whereas for M2 we have The ratio is then 1.2, which is "barely worth mentioning" even if it points very slightly towards M1.

Note, however, that a non-uniform prior (for example one that reflects the fact that you expect the number of success and failures to be of the same order of magnitude) could result in a Bayes factor that is more in agreement with the frequentist hypothesis test.

A classical likelihood-ratio test would have found the maximum likelihood estimate for q, namely

The ability of Bayes factors to take this into account is a reason why Bayesian inference has been put forward as a theoretical justification for and generalisation of Occam's razor, reducing Type I errors.

Model M1 has 0 parameters, and so its Akaike information criterion (AIC) value is