BRAGA

02 Writing02-02 Notes02-02-459

Posterior Odds

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
O12=p(M1∣D)p(M2∣D)=p(D∣M1) p(M1)p(D∣M2) p(M2)O_{12} = \frac{p(M_1 \mid D)}{p(M_2 \mid D)} = \frac{p(D \mid M_1)\,p(M_1)}{p(D \mid M_2)\,p(M_2)}
(1)

We are working on posterior odds for Bayesian model comparison, defined by O12=p(M1∣D)p(M2∣D)=p(D∣M1) p(M1)p(D∣M2) p(M2)O_{12} = \frac{p(M_1 \mid D)}{p(M_2 \mid D)} = \frac{p(D \mid M_1)\,p(M_1)}{p(D \mid M_2)\,p(M_2)}, where M1M_1 and M2M_2 are competing models or hypotheses and DD is the observed data. The setting is Bayesian model selection under a mutually exclusive comparison framework, where each model has a prior probability and a marginal likelihood, and the comparison links directly to prior odds and the Bayes Factor.

Deep Breakdown

Posterior odds quantify how much more plausible one model is than another after observing data. In Bayesian model comparison, we do not compare models only by fit.

We compare them by combining:

  1. Prior belief in each model, and
  2. Evidence from the data under each model.

This makes posterior odds a central object in Bayesian decision-making, hypothesis testing, and model selection.

Suppose we have two competing models:

  • M1M_1, for example, “campaign variant B increases conversion rate,”
  • M2M_2, for example, “campaign variant B does not increase conversion rate.” After observing data DD, we want to know which model is better supported.

Posterior odds answer that directly:

O12=p(M1∣D)p(M2∣D)O_{12} = \frac{p(M_1 \mid D)}{p(M_2 \mid D)}
(2)

If O12>1O_{12} > 1, the data and priors together favor M1M_1 over M2M_2. If O12<1O_{12} < 1, they favor M2M_2. If O12=1O_{12} = 1, both models have equal posterior support. Using Bayes’ rule, posterior odds decompose into two parts:

O12=p(D∣M1)p(D∣M2)⋅p(M1)p(M2)O_{12} = \frac{p(D \mid M_1)}{p(D \mid M_2)} \cdot \frac{p(M_1)}{p(M_2)}
(3)

This is:

  • Bayes Factor ×\times prior odds So posterior odds are the updated odds after the data transform the prior odds.

This decomposition is important because it separates:

  • what we believed before seeing the data,
  • what the data say through the marginal likelihood.

The term p(D∣Mj)p(D \mid M_j) is not the likelihood evaluated at one parameter value.

It is the marginal likelihood:

p(D∣Mj)=∫p(D∣θj,Mj) p(θj∣Mj) dθjp(D \mid M_j) = \int p(D \mid \theta_j, M_j)\,p(\theta_j \mid M_j)\,d\theta_j
(4)

for continuous parameters, or a sum for discrete parameters. This means each model is evaluated by averaging its likelihood over its parameter prior. That is why Bayesian model comparison automatically penalizes over-flexible models: a model with many parameter settings that fit poorly can end up with a lower marginal likelihood, even if its best-fit likelihood is high. This makes posterior odds different from frequentist test statistics and different from criteria like AIC or BIC, though they are related conceptually. Posterior odds give a direct probabilistic comparison between models under the Bayesian framework.

In DA/DS, this is useful for:

  • comparing competing hypotheses,
  • choosing between simpler and more complex predictive models,
  • evaluating whether a feature adds enough evidence to justify inclusion,
  • comparing intervention vs no-intervention explanations,
  • interpreting evidence in A/B testing or causal inference workflows.

Flowchart

Start with twocompetingmodels $M_1$and $M_2$Assign priorprobabilities$p(M_1)$ and$p(M_2)$Observe data$D$Computemarginallikelihoods $p(D\mid M_1)$ and$p(D \mid M_2)$Compute BayesFactor$\frac{p(D \midM_1)}{p(D \midM_2)}$Compute priorodds$\frac{p(M_1)}{p(M_2)}$Multiply BayesFactor by prioroddsGet posteriorodds $O_{12}$Interpretwhetherevidence favors$M_1$ or$M_2$Use result forBayesian modelselection orhypothesiscomparison

#machine-learning#machine-learning-algorithms#model-selection-and-information-criteria

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close