Bayesian Chi-Square Test
Bayesian Chi-Square Test of Independence · Also known as: Bayesian contingency table test, Bayes factor chi-square, Bayesian goodness-of-fit test, Bayesian association test
The Bayesian chi-square test evaluates independence or goodness-of-fit in frequency tables using Bayes factors rather than classical p-values. It quantifies evidence for or against an association between categorical variables, updating prior beliefs with observed counts and delivering an odds-like ratio that distinguishes 'no evidence' from 'evidence of no effect'.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use when you have two or more categorical variables arranged in a contingency table and you want to quantify evidence for or against an association rather than simply reject or retain a null. It is particularly valuable when you need to distinguish 'no evidence of association' from 'evidence of no association', when samples are small and asymptotic approximations of the classical chi-square are unreliable, or when you want to accumulate evidence across sequential samples. Do not use when the data are not counts (e.g. continuous outcomes), when cells have expected frequencies so low that even Bayesian approximations become unstable (fewer than 5 expected per cell in very sparse tables with many categories), or when a fully informative substantive prior is needed but cannot be specified.
Strengths & limitations
- Distinguishes 'absence of evidence' from 'evidence of absence', a gap that the classical p-value cannot fill.
- Provides a continuous scale of evidence that communicates how strongly data support either hypothesis.
- Default (Gunel-Dickey) priors are available in major software (JASP, BayesFactor R package), making application straightforward.
- Results can be updated as new data accumulate without violating Type-I error control.
- Avoids arbitrary alpha thresholds; BF10 = 2.5 and BF10 = 2.6 are treated as equally informative rather than one being 'significant' and the other not.
- The Bayes factor depends on the prior; different concentration parameters can shift conclusions in small samples.
- Interpretation requires familiarity with Bayes-factor scales; misreading BF10 < 1 as 'against H0' is a common error.
- Software support is narrower than for the classical chi-square, limiting use in some applied fields.
- For very large tables with sparse cells, numerical computation of the marginal likelihood can be challenging.
- Does not directly provide confidence-interval analogues; credible intervals for cell probabilities require additional modelling.
Frequently asked
How is this different from the classical chi-square test?
The classical chi-square test produces a p-value — the probability of data this extreme or more extreme under the null. The Bayesian version produces a Bayes factor, which directly quantifies how much more (or less) probable the observed data are under the association model compared with the independence model. The Bayes factor can support the null, something a p-value cannot do.
What prior should I choose?
The Gunel-Dickey default prior (Dirichlet with concentration parameter 1) is the standard recommendation for exploratory work and matches the default in JASP. If you have substantive prior knowledge about cell probabilities — for example from a previous study — you can specify an informative Dirichlet prior. Always report the prior used and run a sensitivity analysis across plausible parameter values.
What does a Bayes factor of 6 mean?
BF10 = 6 means the observed data are six times more probable under the association hypothesis than under the independence hypothesis. By conventional scales (Jeffreys, 1961), this falls in the 'moderate to strong' evidence range for H1.
Can I use this with a 2x2 table?
Yes. For 2x2 tables you can also consider the Bayesian Fisher exact test, which conditions on both marginal totals. The Gunel-Dickey framework covers a range of 2x2 sampling models; JASP and the BayesFactor R package implement all of them and let you select the appropriate one.
What software supports this test?
JASP provides a user-friendly GUI implementation with default Gunel-Dickey priors. The BayesFactor package in R (Morey & Rouder) gives programmatic access. Both produce BF10 alongside classical chi-square results for easy comparison.
Sources
- Good, I. J. (1967). A Bayesian significance test for multinomial distributions. Journal of the Royal Statistical Society: Series B (Methodological), 29(3), 399–418. DOI: 10.1111/j.2517-6161.1967.tb00705.x ↗
- Jamil, T., Ly, A., Morey, R. D., Love, J., Marsman, M., & Wagenmakers, E.-J. (2017). Default 'Gunel and Dickey' Bayes factors for contingency tables. Behavior Research Methods, 49(2), 638–652. DOI: 10.3758/s13428-016-0739-8 ↗
How to cite this page
ScholarGate. (2026, June 3). Bayesian Chi-Square Test of Independence. ScholarGate. https://scholargate.app/en/statistics/bayesian-chi-square-test
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Bayesian Fisher's exact testStatistics↔ compare
- Bayesian Independent Samples t-testStatistics↔ compare
- Chi-square testStatistics↔ compare