統計推論互動式教學

從機率分布到貝氏推論,從多重檢定到存活分析——17 個主題帶你打通生物資訊統計的任督二脈,每頁皆附互動模擬、R / Python 雙語程式碼與三題自我檢測。

From probability distributions to Bayesian inference, from multiple testing to survival analysis — 17 modules tying classical statistics to bioinformatics practice, each with interactive simulations, R/Python code, and self-check quizzes.

01 頻率學派基礎

🎲
Step 1

機率與分布

隨機變數、離散/連續分布、CLT 與 LLN——為 RNA-seq 計數 (NB) 與檢定統計量打下基礎。

Random variables, discrete/continuous distributions, CLT and LLN — the foundation for NB count models and test statistics.

🎯
Step 2

點估計與抽樣分布

MLE、動差法、Fisher information 與 Cramér-Rao 下界,理解 DESeq2 為何要做 dispersion shrinkage。

MLE, method of moments, Fisher information, Cramér-Rao — why DESeq2 shrinks dispersion.

📏
Step 3

信賴區間與 Bootstrap

CI 的正確解讀,BCa bootstrap 補救解析解失效的場景,以及與貝氏 credible interval 的差異。

Correct CI interpretation, BCa bootstrap when analytic SEs fail, contrast with credible intervals.

⚖️
Step 4

假設檢定與錯誤

型一/型二錯誤、檢定力、p-value 誤用——告別「p>0.05 等於沒效果」。

Type I/II errors, power, p-value misuse — escape "p>0.05 means no effect".

🧪
Step 5

常見檢定方法

t / Welch / 配對 / Wilcoxon / Mann-Whitney / χ² / Fisher / ANOVA / Kruskal——附決策樹。

t / Welch / paired / Wilcoxon / Mann-Whitney / χ² / Fisher / ANOVA / Kruskal — with a decision tree.

02 迴歸與 GLM

📈
Step 6

線性迴歸與診斷

OLS 假設、殘差圖、VIF、Cook's distance、HC3 穩健標準誤。

OLS assumptions, residual plots, VIF, Cook's distance, HC3 robust SEs.

🔀
Step 7

ANOVA / 混合模型

lme4、批次效應、部分匯整 (partial pooling)、emmeans 對比。

lme4, batch effects, partial pooling, emmeans contrasts.

🎚️
Step 8

Logistic 迴歸與勝算比

logit 連結、OR 解讀、Firth 修正、ROC vs 校準。

logit link, OR interpretation, Firth correction, ROC vs calibration.

🔢
Step 9

GLM 計數模型

連結函數、deviance、過度離散、零膨脹——直通 DESeq2 / edgeR。

Links, deviance, overdispersion, zero-inflation — the bridge to DESeq2 / edgeR.

03 貝氏推論

🧠
Step 10

貝氏定理、先驗、後驗

Beta-Binomial、Gamma-Poisson 等共軛先驗,與後驗預測分布。

Beta-Binomial, Gamma-Poisson conjugate priors, and posterior predictive distributions.

⛓️
Step 11

MCMC 與診斷

Stan / brms / PyMC、NUTS、R-hat、ESS、divergent transitions。

Stan / brms / PyMC, NUTS, R-hat, ESS, divergent transitions.

📐
Step 12

後驗摘要 / BF / PPC

HDI / ETI、posterior predictive check、LOO-CV、WAIC。

HDI vs ETI, posterior predictive checks, LOO-CV, WAIC.

🪢
Step 13

階層 / 經驗貝氏

James-Stein、limma eBayes、ashr——20,000 基因如何借力借強度。

James-Stein, limma eBayes, ashr — borrowing strength across 20,000 genes.

04 生物資訊應用

🚦
Step 14

多重檢定與 FDR

Bonferroni / BH / Storey q-value / IHW / local FDR;p-value 直方圖診斷。

Bonferroni / BH / Storey q-value / IHW / local FDR; p-value histogram diagnostics.

🧬
Step 15

DE 統計核心

voom、NB GLM、QL F-test、lfcShrink (apeglm/ashr)。

voom, NB GLM, QL F-test, lfcShrink (apeglm/ashr).

🔄
Step 16

排列 / Bootstrap / GSEA

樣本排列 vs 基因排列、CAMERA、fgsea、competitive vs self-contained。

Sample vs gene permutation, CAMERA, fgsea, competitive vs self-contained tests.

Step 17

存活分析

Kaplan-Meier、log-rank、Cox PH、Schoenfeld 殘差、競爭風險。

Kaplan-Meier, log-rank, Cox PH, Schoenfeld residuals, competing risks.

05 延伸學習

📚
References

參考資料佐證

17 主題的權威書籍(Wasserman、Casella & Berger、Gelman BDA3)、原始論文、套件文件,附 DOI 連結。

Canonical books (Wasserman, Casella & Berger, Gelman BDA3), original papers, and package docs for all 17 topics — with DOI links.

📝
Quiz

互動式考題

涵蓋 17 主題的單選、多選、是非題,內建錯題複習、隨機練習、考試模式與多使用者進度。

Single-choice, multi-select, and T/F questions across all 17 topics — with wrong-answer review, exam mode, and multi-user progress tracking.