- Introduced by
- Rouder, Morey, Speckman & Province
- Year
- 2012
- Type
- Bayesian hypothesis test / group comparison
What does it do?
Bayesian ANOVA, formalised by Rouder, Morey, Speckman and Province (2012), tests whether group means differ by quantifying the evidence for the alternative hypothesis against the null using the Bayes Factor (BF₁₀).
Unlike classical ANOVA, it can also express evidence for the null hypothesis, so a result of no group difference is reported on the same scale as a result of a difference.
The intuition behind the method
Consider two competing accounts of the data: one holds that all groups share the same mean, and the other holds that at least one group differs. The Bayes Factor is the ratio of how well each account predicts the observed data, given a default Cauchy prior on effect sizes. A BF₁₀ of 10 means the data are ten times more likely under the alternative than under the null. A BF₁₀ of 0.1 is evidence of the same strength for the null, which a p-value cannot express.
History
The default Bayes Factor framework for ANOVA was formalised by Rouder, Morey, Speckman and Province in their 2012 paper in the Journal of Mathematical Psychology, which provides default Bayes Factors for ANOVA designs. The approach places a Cauchy prior on standardised effect sizes, so that an analysis can be run without subjective prior input. The prior is linked to the JZS (Jeffreys–Zellner–Siow) prior, which connects the approach to Jeffreys' earlier work on Bayesian hypothesis testing.
When to use it
Use Bayesian ANOVA when comparing a continuous outcome across two or more independent groups and when evidence for the null matters as much as evidence against it. It suits studies where no group difference is a plausible and meaningful result, where a default prior on effect sizes is acceptable, and where the full posterior of the group effects is wanted. Be cautious with very small samples, particularly small per-group sizes, where the Bayes Factor can be dominated by the Cauchy prior. Because the result depends on the prior scale, a prior-sensitivity analysis (for example, varying r over a plausible range around 0.707) should accompany the main analysis, especially when n is small. The method assumes independent groups. Designs with repeated or dependent measures need a different Bayesian model, such as a hierarchical model (see the related hierarchical Bayes page) or a repeated-measures Bayesian ANOVA.
Limitations and considerations
- With small per-group samples, the Bayes Factor is overly sensitive to the prior and can be unreliable.
- The Cauchy scale r = 0.707 is a default and may not match prior expectations in a given field, so results depend on it and need a sensitivity check.
- The model tests the omnibus question of whether group means differ; it does not test specific contrasts between groups without additional Bayesian comparisons.
- Posterior sampling requires MCMC and convergence diagnostics, which add computation and interpretation steps compared with classical ANOVA.
- The model assumes independent observations, normally distributed errors with a common variance σ² across groups (as in the model equation for y_ij), and fixed group effects. When these assumptions are doubtful, check the residuals before interpreting the result. Unequal variances or random group effects require an extended model.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Quantifies evidence for both the alternative and the null hypothesis, whereas a p-value can only reject the null.
- Gives a graded scale of evidence (BF₁₀ above 3 moderate, above 10 strong, above 30 very strong) instead of a binary decision.
- Uses a default Cauchy prior (r = 0.707) that requires no elicitation of subjective prior beliefs from the analyst.
- Reports posterior distributions and credible intervals for the group effects, so parameter uncertainty is shown alongside the Bayes Factor.
Applications
- Experimental psychology and neuroscience studies comparing response times, accuracy or neural measures across experimental conditions.
- Clinical studies that compare outcomes across patient groups, particularly where a finding of no difference is itself informative.
- Educational research comparing learning outcomes across instructional conditions.
- Cross-sectional studies with two or more independent groups in which the goal is to quantify evidence for and against group differences rather than only to reject a null.
How it works
How it works
Bayes' rule gives the probability of each hypothesis given the data as proportional to the likelihood of the data under that hypothesis multiplied by the prior probability of the hypothesis. Bayesian ANOVA applies this rule to compare the null model (all group means equal) with the alternative model (group means differ). Under the alternative, the standardised group offsets receive a Cauchy prior whose scale parameter r controls how large the effects are expected to be. A commonly used default is r = 0.707 (approximately √2/2). When reporting this default, confirm the exact recommended value against the original article by Rouder et al. (2012).
Formula
p(\mathcal{H}_1 \mid \text{data}) \propto p(\text{data} \mid \mathcal{H}_1)\,p(\mathcal{H}_1)The likelihood is a standard ANOVA structure: each observation y_ij equals a grand mean μ plus a group offset α_j plus normally distributed error ε_ij. Under the null, all α_j are fixed at zero. Under the alternative, the α_j receive a Cauchy prior with scale r (0.707 in the default setting shown here). The Bayes Factor compares the marginal likelihood of the data under each hypothesis, obtained by integrating the parameters out with respect to their priors.
Formula
y_{ij} = \mu + \alpha_j + \varepsilon_{ij},\quad \varepsilon_{ij} \sim \mathcal{N}(0, \sigma^2)BF₁₀ is the ratio of the marginal likelihood under H₁ to that under H₀, and BF₀₁ = 1/BF₁₀. Because each marginal likelihood is obtained by integrating the parameters out against their priors, the Bayes Factor is a measure of relative support for two models. By itself it is not a posterior probability of either hypothesis. Values above 3 indicate moderate evidence for the alternative, above 10 strong evidence, and above 30 very strong evidence. Values below 1 favour the null. Posterior distributions of group means and effect sizes are sampled with MCMC; MCMC is used for these posterior summaries rather than for the Bayes Factor itself. The chains must be checked for convergence (R-hat, effective sample size, trace plots) before posterior summaries are interpreted.
Formula
\mathrm{BF}_{10} = \frac{p(\text{data} \mid \mathcal{H}_1)}{p(\text{data} \mid \mathcal{H}_0)}Common pitfalls
- Treating a BF₁₀ between 1 and 3 as conclusive. Such values are weak and should not be reported as conclusive evidence for either hypothesis.
- Omitting the prior-sensitivity analysis. Changing the prior scale r, even modestly, can move the Bayes Factor noticeably, particularly at small sample sizes.
- Reading the Bayes Factor as a significance threshold. It measures the relative support for two models, not whether an effect is significant at a fixed error rate.
- Reporting the Bayes Factor or posterior summaries before checking MCMC convergence (R-hat and effective sample size must be adequate).
- Applying the method with small per-group samples. The Bayes Factor is then driven more by the prior, so any result should be reported as prior-dependent rather than as evidence about the groups.
Frequently asked questions
How is BF₁₀ different from a p-value?
A p-value measures how surprising the data are under the null hypothesis alone; it cannot quantify evidence for the null. BF₁₀ is the ratio of the probability of the data under the alternative to the probability under the null, so it measures evidence for both hypotheses. A BF₁₀ of 0.1 is evidence for the null; a p-value of 0.5 does not show that.
What does the Cauchy prior with r = 0.707 mean?
The Cauchy prior places a probability distribution over the standardised effect sizes of the group differences before the data are seen. Its scale parameter r (0.707, approximately √2/2, in the default setting given here) sets the scale of effects the prior expects. The distribution is symmetric about zero, so it does not favour a direction, and its heavy tails allow large effects as well as small ones. It is called a default because it can be used without domain-specific prior knowledge.
When should I use Bayesian ANOVA instead of classical one-way ANOVA?
Bayesian ANOVA is the better choice when (a) you want to be able to conclude that groups do not differ, not just fail to reject the null; (b) you want full posterior distributions and credible intervals rather than point estimates and confidence intervals; or (c) you want to communicate the strength of evidence on a continuous, interpretable scale. Classical ANOVA remains practical when sample sizes are large, prior specification is of no interest, and a binary reject/do-not-reject decision is sufficient.
What convergence checks are required after MCMC sampling?
Commonly used guidelines are: (1) R-hat close to 1, with values below about 1.01 often used as a threshold, indicating that the chains have mixed; (2) an effective sample size adequate for the posterior summaries reported, where the required size depends on the quantities of interest; and (3) visual inspection of trace plots to confirm the chains are not stuck. If these diagnostics fail, the MCMC output should not be used to draw conclusions until the number of iterations is increased or the model is re-examined.
Related methods
Sources
Rouder, J. N., Morey, R. D., Speckman, P. L. & Province, J. M. (2012). Default Bayes Factors for ANOVA Designs. Journal of Mathematical Psychology, 56(5), 356–374.
Open DOI reference