categorical
Fisher's exact test
Analyze a small 2x2 contingency table.
Requirements
- two binary variables
- small expected counts
Avoid when
- large tables unless exact computation is intended
Formula
P = [(a+b)!(c+d)!(a+c)!(b+d)!] / [a!b!c!d!n!]
Interpretation
Exact p-value for association in a 2x2 table.
Worked example
Test association in a sparse 2-by-2 adverse-event table.
Open example datasets