跳至主要內容
1 · 第2學期生物統計推論統計

卡方檢定

Chi-Square Test

難度 2 · 基礎statisticsgenetics

卡方統計量的理論根基在於多項分布與對數線性模型,並與因果推論和遺傳流行病學深度結合。

漸近理論

在 H₀ 下,Pearson χ² 與 likelihood ratio G² = 2Σ Oᵢⱼ ln(Oᵢⱼ/Eᵢⱼ) 漸近等價,均趨近 χ²(df)。χ² 基於 Taylor 展開的二次近似;G² 是 deviance,在 nested model 比較中可加性分解(Agresti, 2013, Categorical Data Analysis, 3rd ed.)。χ² 在中等樣本表現較佳;G² 在大樣本中與 likelihood 理論更一致。

精確檢定與小樣本

Fisher's exact test 以超幾何分布計算 p-value,不依賴漸近近似。計算複雜度限制了大表的應用;Mehta & Patel(1983, JASA)提出 network algorithm 使之可行(SAS PROC FREQ / R: fisher.test)。Barnard's exact test 在 2×2 表中比 Fisher 更有統計檢定力,因其不以邊際固定為條件。

對數線性模型 (Log-linear Model)

ln(Eᵢⱼ) = λ + λᵢᴬ + λⱼᴮ + λᵢⱼᴬᴮ。獨立性 H₀ ⟺ λᵢⱼᴬᴮ = 0 ∀i,j。三維以上列聯表可以 hierarchical log-linear model 分析條件獨立性。Backward elimination 以 G² 差檢驗移除效果(Bishop, Fienberg & Holland, 1975)。

Cochran-Mantel-Haenszel (CMH) 檢定

控制分層變數 K 後檢驗 A 與 B 的關聯:CMH statistic = [Σₖ(a_k − E(a_k))]² / Σₖ Var(a_k)。合併 OR(Mantel-Haenszel OR)= Σ(aₖdₖ/nₖ) / Σ(bₖcₖ/nₖ)。Breslow-Day test 檢驗各層 OR 是否同質(Breslow & Day, 1980, Statistical Methods in Cancer Research)。

多重列聯表與模型選擇

BIC 與 AIC 在 log-linear model 選擇中的應用。Bayesian 方法以 Dirichlet prior 處理稀疏表格(Albert & Gupta, 1982)。Exact conditional inference 在稀疏表格中優於漸近方法。

分子流行病學應用

基因型-疾病關聯分析:allelic χ²、genotypic χ²、Cochran-Armitage trend test(假設加成遺傳模型,df=1,比標準 χ² 更有檢定力)。Hardy-Weinberg equilibrium test 本質上也是 χ² goodness-of-fit(Wigginton, Cutler & Abecasis, 2005, Am J Hum Genet)。在 GWAS 品質管控中,HWE deviation 可標記 genotyping error。

文獻參考:Agresti, A. (2013). Categorical Data Analysis, 3rd ed. Wiley. / Breslow, N.E. & Day, N.E. (1980). Statistical Methods in Cancer Research. Vol 1. IARC. / Wigginton, J.E. et al. (2005). Am J Hum Genet, 76, 887-893.

互動工具

動手玩玩看

用互動元件直接感受這個概念,比純文字快 10 倍搞懂。三個 tier 共用同一個工具。

這個和什麼有關