Bayesian Hypothesis Testing and Bayes Factors
What you'll learn: How to compare competing hypotheses by calculating the ratio of their marginal likelihoods—the Bayes factor.
The Core Idea
In frequentist hypothesis testing, you reject or fail to reject a null hypothesis based on p-values. Bayesian hypothesis testing takes a different approach: it directly compares the evidence for two competing hypotheses (or models) using their posterior probabilities.
The Bayes factor is the key tool here. It's the ratio of marginal likelihoods:
BF₁₂ = P(Data | H₁) / P(Data | H₂)
This tells you how many times more likely the data are under hypothesis H₁ than under H₂. The marginal likelihood P(Data | Hᵢ) is found by integrating over all parameter values under that hypothesis—essentially averaging the likelihood weighted by the prior.
How It Works
Think of the Bayes factor as a strength-of-evidence dial:
- BF₁₂ > 10: Strong evidence for H₁
- BF₁₂ ≈ 1: Data provide no clear preference
- BF₁₂ < 0.1: Strong evidence for H₂
Unlike p-values, Bayes factors can support the null hypothesis (or any competing model). They also automatically penalize overly complex models that don't improve fit—a built-in Occam's razor.
Example Interpretation
Suppose BF₁₂ = 5. This means the observed data are 5 times more likely under H₁ than H₂. Combined with your prior odds (how plausible each hypothesis was before seeing data), you update to posterior odds via:
Posterior Odds = Prior Odds × Bayes Factor
This framework lets you explicitly quantify how evidence shifts your beliefs between competing models.
Key Takeaway: Bayes factors quantify relative evidence between hypotheses by comparing their marginal likelihoods, offering a coherent alternative to p-value-based testing that can support any hypothesis and naturally penalizes complexity.