# 變異數分析(ANOVA) ###### tags: `biostatistic` {%hackmd BkVfcTxlQ %} 如果面對多組比較時,只單憑逐一倆倆比較會有過度檢定(overtesting)的問題, 只當一個檢定時type I error的$\alpha< .05$,但多個檢定集合的error就會被放大,<br> $1-(1-\alpha)^k$ ## 原理 + 組間變異($s^2_w$)>組內變異($s^2_b$),兩者都被稱為均方(mean squares,MS)也是σ<sup>2</sup>的估計值 + 以H<sub>0</sub>來說兩個均方的比值應該會很接近1,$s^2_b/s^2_w$的抽樣分布為*F* distribution 這個分布跟*t* distribution一樣是個家族,每對自由度對應一個分布 Fig. *F*分布的機率密度函數圖形 <img src="https://2aih25gkk2pi65s8wfa8kzvi-wpengine.netdna-ssl.com/statistics/files/2018/04/325px-F-distribution_pdf.svg_-300x225.png" style="zoom:100%" width=800 height=450> + 自由度有兩個,$s^2_b$有k-1個自由度,k為組數;$s^2_w$有N-k個自由度,N為總觀測數 + ANOVA計算 Table. One-way ANOVA k組資料之符號表示 $$ \left[ \begin{matrix} & 1 & 2 & \cdots & i & \cdots & k \\ & x_{11} & x_{21} & \cdots & x_{i1} & \cdots & x_{k1}\\ & x_{12} & x_{22} & \cdots & x_{i2} & \cdots & x_{k2}\\ & x_{13} & x_{23} & \cdots & x_{i3} & \cdots & x_{k3}\\ & \vdots & \vdots & & \vdots & & \vdots\\ & x_{1j} & x_{2j} & \cdots & x_{ij} & \cdots & x_{kj}\\ & \vdots & \vdots & & \vdots & & \vdots\\ & x_{1n_1} & x_{2n_2} & \cdots & x_{in_i} & \cdots & x_{kn_k} \\ 總和 &\sum{x_{1j}} & \sum{x_{2j}} & \cdots & \sum{x_{ij}} & \cdots & \sum{x_{kj}} & \sum\sum{x_{ij}} \\ 平均數 & \bar{x_1} & \bar{x_2} & \cdots & \bar{x_i} & \cdots & \bar{x_k} & \bar{x} \end{matrix} \right] $$ 組內平方和 $$ SS_b = [\frac{(\sum{(x_1)^2})}{n1}+\frac{(\sum{(x_2)^2})}{n2}+ \cdots]-\frac{(\displaystyle\sum^{k}_{i=1}\displaystyle\sum^n_{j=1}{x})^2}{N} $$ 組間平方和 $$ SS_w=\displaystyle\sum^k_{i=1}\displaystyle\sum^n_{j=1}{x^2}-[\frac{(\sum{x_1})^2}{n_1}+\frac{(\sum{x_2})^2}{n_2}+\cdots] $$ 總平方和 $$ SS_t=\displaystyle\sum^k_{i=1}\displaystyle\sum^n_{j=1}{x^2}-\frac{(\displaystyle\sum^k_{i=1}\displaystyle\sum^n_{j=1}{x})^2}{N} $$ 檢定統計量*F* $$ F=\frac{\displaystyle\sum_{i}{n_i(\bar{x_i}-\bar{x})^2/(k-1)}}{\displaystyle\sum_{ij}{(x_{ij}-\bar{x_i})^2/(N-k)}} $$ ## 事後檢定 - Tukey's HSD Test (honest significant difference) 檢定所有的成對之組間平均數是否相等 q統計量來自最大的平均值減最小的平均值,再除以所有族群其平均值之標準差。所有族群平均值的標準差之總和除以樣本數目稱為族群之的均方(Mean Square Within , MS<sub>w</sub>) 當成對的組間平均數差異大於HSD值 $HSD=q(\alpha, k, N-k)\sqrt{\frac{MS_w}{n}}$ 各組樣本數不同也適合 - Scheffee - Bonferroni - Dunnett - LSD: 這個算法只是逐一做t-test? 最大的顯著差異 (LSD) 成對多重比較檢定相當於所有成對群組間的多重個別 t 檢定。此檢定的缺點是不會嘗試調整多重比較的觀察顯著性層級。 ## 雙因子變異數分析 若效果因子A和B都是類別變數使用雙因子變異數分析,若A為類別變數,B為連續變數,則無法執行,須改為共變數分析 <a id = "manova"></a> ## 多因子變異數分析 > 李采娟、梁文敏、李佳霙、張玉君 (譯) (2008)。基礎生物統計學 (原作者:Kuzma and Bohnenblust)。變異數分析 (226-246頁)。台北市:雙葉書廊。(原著出版年:2004) > [F考驗與事後比較的問題!!(ANOVA AND POST HOC)](https://dasanlin888.pixnet.net/blog/post/34468892) > [多重比較分析檢定 | 中興大學 生物系統工程研究室 陳加忠](http://amebse.nchu.edu.tw/new_page_534.htm) > [多重比較 Multiple comparisons | 研究生2.0](https://researcher20.com/2010/05/27/%E5%A4%9A%E9%87%8D%E6%AF%94%E8%BC%83-multiple-comparisons/) > [單向變異數分析的事後檢定](https://www.ibm.com/support/knowledgecenter/zh-tw/SSLVMB_sub/statistics_mainhelp_ddita/spss/base/idh_onew_post.html) > [二因子變異數分析 (Two way ANOVA)-獨立樣本-統計說明與SPSS操作 | 永析](https://www.yongxi-stat.com/two-way-anova/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.