- 卡方檢驗(chi-square test):獨立性檢驗,判斷變量之間是否有相關性;
- 費歇爾精確檢驗(fisher's exact test):同樣為獨立性檢驗,但基於超幾何分布;
什么情況下用卡方檢驗(chi-square test)或費歇爾精確檢驗(fisher's exact test)呢?
以下面二聯表為例:
| 健康 | 患病 | |
|---|---|---|
| 吸煙 | A | B |
| 不吸煙 | C | D |
N=A+B+C+D
假定吸煙患病人群是二聯表中人數最少的,那么吸煙患病人群的理論頻數T=(A+B)*(B/N)
- 當 T ≥5 且 N ≥ 40,采用卡方檢驗(chi-square test);
- 當 1<= T<5 ,且 N ≥ 40,采用連續性校正的卡方進行檢驗;
- 當 T<1 或 N<40,采用費歇爾精確檢驗(fisher's exact test);
