Bayes factor Created 2026-09-28 Updated 2026-10-18
A Bayes factor measures how data change the relative support for two specified statistical models. Write for their Bayesian model evidence and define the direction explicitly:For positive finite , a value above one favors over ; a value below one favors over . Reversing the comparison gives , the opposite direction used in some formulas below.
For mutually exclusive, exhaustive with positive prior probabilities, divide their two Bayes' theorem formulas. Their common data normalizer cancels, leavingThe Bayes factor therefore multiplies prior odds into posterior odds. It is evidence conditional on the specified statistical models and their within-model prior distributions; it is not . Model prior probabilities supply a separate input.[ref]
Bayes Factors by Robert E. Kass and Adrian E. Raftery. Kass and Raftery, Bayes Factors (1995), section 3.1, p. 776: posterior odds, prior odds, and direction of the Bayes factor
For an original stipulated example, consider ten independent and identically distributed Bernoulli trials, with heads as success. Compare with , both fixed before seeing the data. Take to be one particular ordered sequence containing eight heads and two tails. The likelihood function under either point model is , soIf , the prior odds for against are . Hence the posterior odds are , andEqual model prior probabilities would instead give . The same Bayes factor can thus accompany different posterior probabilities. These statements condition on the two-model comparison; they do not establish that either statistical model describes a real coin.
Using the heads count instead of the ordered sequence changes the sample space. The binomial distribution assigns it mass . The same binomial coefficient multiplies both models' Bayesian model evidence and cancels in their Bayes factor. Mixing an ordered-sequence numerator with a count denominator would introduce an erroneous factor of .
Fix the candidate statistical models, their parameter prior distributions, and model prior probabilities before using the current data for this update. The Bayes factor is useful because it separates evidence from model prior odds, but it still depends on the parameter prior distributions. An improper prior has an arbitrary multiplicative normalization: multiplying its kernel by multiplies its formal marginal likelihood by , even if the within-model posterior distribution is normalizable. Without a separately justified convention, the ordinary Bayes factor is then undefined up to arbitrary constants.[ref]
Bayes Factors by Robert E. Kass and Adrian E. Raftery. Kass and Raftery, Bayes Factors (1995), sections 5.2–5.3, pp. 782–783: prior sensitivity and undefined multiplicative constants
Bayesian model evidence Created 2026-09-24 Updated 2026-10-18
The Bayesian model evidence is the prior predictive distribution evaluated at the data . For a statistical model with a normalized prior density , its marginal likelihood isThis is an expected value of the likelihood function under the prior distribution; for discrete statistical parameters, replace the integral by a sum. For continuous observations, is a probability density function value with respect to a specified data reference measure, rather than a probability of one exact observation. Comparisons must use the same data and reference measure. The same normalizes the within-model Bayesian posterior and supplies the between-model comparison in a Bayes factor.[ref]
Bayes Factors by Robert E. Kass and Adrian E. Raftery. Kass and Raftery, Bayes Factors (1995), section 3.1, p. 776, equations (1)–(2): integrating over parameter priors
A normalized prior distribution makes the Bayesian model evidence an average, so it cannot exceed the largest likelihood function value on its support. A broad prior distribution can assign little mass to values that predict the data well, even when one value gives an excellent fit. The worked uniform-alternative binomial Bayes factor below makes the difference between averaging and maximum likelihood estimation explicit.
Deviance information criterion 2026-10-06
For Bayesian deviance under a common likelihood convention, define and . Then trades average fit against effective complexity. Lower values suggest better penalized predictive fit in comparable models; differences are not Bayes factors or model posterior probabilities. The choice of stochastic parameters and latent-variable representation matters, especially in a hierarchical Bayesian model.
Gaussian practical-null mixture Created 2026-10-06 Updated 2026-10-14
A Gaussian practical-null mixture compares a narrow centered normal distribution prior with a wider centered normal distribution prior. Neither component is a point mass. With observed mean and prior precisions , its model predictive variances are , and the Bayes factor isThe overall posterior density is a Bayesian model averaging mixture with component means . A wide-prior penalty can favor the practical null near zero; its dominance depends quantitatively on both prior scales and the observation, not merely on the observation being of order .
Odds under at-least-one-positive selection 2026-10-14
For studies conditionally independent given the truth of one relationship, the event that at least one is positive has probability under the alternative and under the null. Its Bayes factor therefore gives the displayed posterior odds. For interior error probabilities these tend back to the prior odds . If power exceeds size, the Bayes factor decreases to one: the quotient of geometric sums is a weighted average of decreasing powers .
This result concerns the coarsened selection event. Full observed results instead multiply their individual Bayes factors, and concordant evidence can accumulate without this bound. It is a useful example of information discarded by publication bias.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 47 5 b Solution Created 2026-10-03 Updated 2026-10-14
For each observation time, use only the currently susceptible risk set , with new-infection indicators . PutThis is the spatial Bernoulli infection model, under conditional independence of the indicators. Distances must be positive. Already infected trees should not be included as new susceptible trials. The minus sign in the power kernel is present in the original PDF, although it is absent in the converted TeX.
The parameter must be nonnegative: for and positive exposure, is not a probability. Therefore the stated unrestricted normal prior distribution cannot literally define the model. A coherent interpretation is a normal prior distribution restricted to ,Here is the standard normal distribution function. Use the same proper prior distribution in both kernel models. The given Gaussian prior distributions for and are mathematically valid on the real line for finite positive distances, though restricting them to positive values would impose decaying kernels and would require the corresponding normalized prior distributions.
The full conditional kernels areNeither is generally normal or another elementary conjugate family: the infection factors contain , and depends nonlinearly on . Thus a simple conjugate Gibbs sampler is unavailable. This does not make Gibbs sampling logically impossible; exact rejection or slice conditional draws could be used if implemented. A straightforward alternative is Metropolis–Hastings algorithm updates within each coordinate.
For example, put and use symmetric Gaussian random-walk proposals for . The target in these coordinates isThe factor is the Jacobian determinant and must be retained. Accept according to the ratio of this target, either for a block or one coordinate at a time. Posterior averages and quantiles of and estimate the requested marginal posterior distributions.
To compare kernels, introduce with positive model prior distribution probabilities . Under model two replace by , defining . The joint model/parameter target iswhere or and is its normalized proper prior distribution. Within each model use the preceding random-walk updates. For a concrete model switch, keep , propose the other model's kernel parameter independently from its prior distribution, and use equal forward and reverse switch-selection probabilities. A move from draws and has ratioAccept with the minimum of this ratio and one. The auxiliary-coordinate swap has absolute Jacobian determinant one, so no additional factor occurs; unequal switch-selection probabilities would require their reverse/forward ratio. This is a valid model-switching Markov chain Monte Carlo construction even though the two active models have equal parameter dimension. Prior distribution proposals may be inefficient, so fitted proposals can be substituted provided their probability densities remain in the acceptance ratio.
After checking mixing, estimate posterior model probabilities by the fractions of retained iterations in each model. The Bayes factor in favor of the first kernel isUse the posterior distributions within each model as well as these odds to assess the competing distance kernels. Proper prior distributions and their model-dependent normalizing constants are essential for this comparison.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 1 d Solution Created 2026-10-03 Updated 2026-10-14
For these two simple hypotheses the Bayes factor is the ratio of their normal probability densities:Therefore , and the posterior odds are .
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 1 e Solution 2026-10-14
Yes: replacing the observed statistic by a significance label loses information. The binary positive event has Bayes factor , but the observed-statistic Bayes factor varies continuously with . A result just at the threshold has , while . Both would receive the same positive label.
The binary calculation is correct for that deliberately coarsened observation; its problem is treating it as the whole evidence when the statistic is available. This is the point developed in Goodman and Greenland's response.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 1 g Solution 2026-10-14
Let denote the event that at least one study is positive. Conditional independence gives and . Updating the prior odds by this event's Bayes factor givesThese are the odds under at-least-one-positive selection, not the odds using every study's actual result.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 1 h Solution 2026-10-14
For , both event probabilities tend to one, so the posterior odds tend to . If , the event's Bayes factor decreases toward one. To see monotonicity, put and writeThe last quotient is a weighted average of the decreasing values , with weights . Adding the next, smaller value decreases the average.
Thus the selection rule becomes less informative as more teams try: eventually a positive study is almost certain even under the null. This explains the hotter-field interpretation in Ioannidis's model. It describes evidence retained by this particular selection event, rather than proving that every individual study becomes less reliable or that the full accumulated evidence gets weaker.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 1 i Solution 2026-10-14
Consistent independent replications should strengthen confidence; contradictory results can weaken it. The change depends on the actual evidence. If of studies are positive and all labels are available, the posterior odds areFor the normal model, retaining the full independent statistics instead givesEach study multiplies the existing odds by its own Bayes factor. Reading a complete synthesis is therefore different from learning only that somebody obtained a positive result. Publication bias, dependence between studies and changes in study design must be accounted for before applying the independent-product formula.
Past exam of the mathematics course of the University of Cambridge 2008 ii Paper 4 27I Solution Created 2026-09-24 Updated 2026-10-14
A sufficient statistic has a conditional distribution of the data given that does not depend on the parameter. In a dominated family, the factorization criterion for sufficiency states that this is equivalent to for a nonnegative parameter-free . Bayes' formula then gives a posterior distribution proportional to , because cancels from numerator and normalizing denominator. Thus the posterior depends on the data only through .
For the normal sample,The first term is parameter-free, so the factorization proves sufficiency of . Combining its likelihood with the normal prior and completing the square givesThe prior predictive distribution of the sample mean is obtained from , independent of :
Define the Bayes factor as the marginal likelihood under divided by that under . The common residual factor cancels, so it is the ratio of the densities of under these two hypotheses:The reverse Bayes factor is its reciprocal. At ,for a fixed positive . Thus the frequentist test is at its rejection threshold while fixed prior odds give increasingly strong posterior support for the point null. This is the Jeffreys-Lindley paradox for a Gaussian point null: the standardized statistic stays fixed, but the observed effect tends to zero and the fixed-scale alternative spreads predictive mass much more widely. There is no logical contradiction, since the procedures compare hypotheses using different calibrations. For the degenerate the hypotheses coincide and .
