Bayesian Contingency Table Test
The Bayesian contingency table test computes a Gunel–Dickey Bayes factor comparing association against independence in an r×c table under a Dirichlet prior matched to the sampling design.
베이즈 분할표 검정은 표집 설계에 맞춘 디리클레 사전분포로 r×c 표의 연관과 독립을 비교하는 Gunel–Dickey 베이즈 인자를 계산합니다.
Can I quantify evidence for independence in a cross-tabulation rather than only failing to reject it?
교차표에서 두 변수가 독립이라는 증거를 '기각 못함'이 아니라 수치로 보여줄 수 있나요?
The Gunel–Dickey Bayes factor compares the marginal likelihood of an unrestricted table with that of an independence model, using conjugate Dirichlet priors whose form depends on whether row totals, the grand total or nothing was fixed by design. BF10 above 1 favours association and below 1 favours independence; for 2×2 tables the posterior distribution of the odds ratio is also reported.
When to use Bayesian Contingency Table Test
- You want evidence for independence as well as against it.
- The table is small or sparse and chi-square approximations are doubtful.
- Group sizes were fixed by design (independent multinomial sampling) or only the total was fixed (joint multinomial).
When to use something else
- Observations are paired or repeated on the same people; use McNemar's test or a Bayesian paired analysis instead.
- Both margins were fixed by design; use Fisher's exact test, as the hypergeometric scheme is not implemented.
Assumptions and requirements
- Each case falls into exactly one cell.
- Observations are independent.
- The sampling scheme selected matches how the data were collected.
What the analysis reports
- BF10 and BF01 with log Bayes factor
- Posterior probability of association under equal prior odds
- Posterior mean and credible interval for each cell or row proportion
- Posterior median odds ratio with credible interval and P(OR > 1) for 2×2 tables
- Classical chi-square for comparison
How to report it
A Bayesian test of independence ([sampling] sampling, Gunel–Dickey prior a = [value]) between [row variable] and [column variable] gave BF10 = [value], indicating [strength] evidence for [an association/independence] (N = [value]).
Related methods
- Chi-Square Test of Independence
- Fisher's Exact Test
- Bayesian A/B Test (Beta-Binomial)
How this method is validated
이 방법의 검증 근거
- Automated tests. Checked by automated run tests; no external reference comparison is recorded yet.
자동 시험. 자동 실행 시험을 거칩니다. 외부 참조값과 대조한 기록은 아직 없습니다.
Run Bayesian Contingency Table Test on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and a grouping variable
- Price
- 400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 credits.
- Checking
- Automated run tests; no external reference comparison yet
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.