# 方差分析

## ANOVA的模式假設

1.各組樣本背後所隱含的族群分布必須為常態分布或者是逼近常態分布。

2.各組樣本必須獨立。

3.族群的變異數必須相等。

i為組別（i=1,2...,I），j為觀測值個數（j=1,2,3,...,J），$Y_{ij}$為第i組第j個觀測值，$\overline{Y}_{total}$為所有觀測值的平均數。

$n_i$為i組內觀測值總數，$\overline{Y}_i$為第i組的平均數

### 雙因子變異數分析（Two-way ANOVA）

#### 1. Fixed-effect

A因子的主效應（ASS）：$nb\sum_{i}(\overline{Y}_{i}-\overline{Y}_{total})^2$ 其均方AMSS為：$\frac{ASS}{a-1}$

B因子的主效應（BSS）：$na\sum_{j}(\overline{Y}_{j}-\overline{Y}_{total})^2$ 其均方BMSS為：$\frac{BSS}{b-1}$

AB因子的交互作用（ABSS）：$n\sum_{i}\sum_{j}(\overline{Y}_{ij}-\overline{Y}_{i}-\overline{Y}_{j}-\overline{Y}_{total})^2$ 其均方ABMSS為：$\frac{ABSS}{(a-1)(b-1)}$

A因子的F檢定為：$\frac{AMSS}{WMSS}$

B因子的F檢定為：$\frac{BMSS}{WMSS}$

## 事後檢定

1. Bonferroni T tests
2. 土其範圍檢定(Tukey's range test)
3. 丹肯新多重範圍檢定(Duncan's new multiple range test)
4. Dunnett's two-tailed test
5. Dunnett's one-tailed test
6. Gabriel's multiple-comparison procedure
7. 雷文檢定(Levene's test)
8. Waller-Duncan test
9. Ryan-Einot-Gabriel-Welsch multiple range test
10. Scheffé's multiple-comparison procedure
11. Student-Newman-Keuls multiple range test
12. Fisher's least-significant-difference test
13. Waller-Duncan K-ratio T test

## 延伸閱讀

• Box, G. E. P.. Non-Normality and Tests on Variances. Biometrika (Biometrika Trust). 1953, 40 (3/4): 318–335. JSTOR 2333350.
• Box, G. E. P.. Some Theorems on Quadratic Forms Applied in the Study of Analysis of Variance Problems, I. Effect of Inequality of Variance in the One-Way Classification. The Annals of Mathematical Statistics. 1954, 25 (2): 290. doi:10.1214/aoms/1177728786.
• Box, G. E. P. Some Theorems on Quadratic Forms Applied in the Study of Analysis of Variance Problems, II. Effects of Inequality of Variance and of Correlation Between Errors in the Two-Way Classification. The Annals of Mathematical Statistics. 1954, 25 (3): 484. doi:10.1214/aoms/1177728717.
• Caliński, Tadeusz & Kageyama, Sanpei. Block designs: A Randomization approach, Volume I: Analysis. Lecture Notes in Statistics 150. New York: Springer-Verlag. 2000. ISBN 0-387-98578-6.
• Christensen, Ronald. Plane Answers to Complex Questions: The Theory of Linear Models Third. New York: Springer. 2002. ISBN 0-387-95361-2.
• Cox, David R. & Reid, Nancy M. (2000). The theory of design of experiments. (Chapman & Hall/CRC). ISBN 978-1-58488-195-7
• Fisher, Ronald. Studies in Crop Variation. I. An examination of the yield of dressed grain from Broadbalk. Journal of Agricultural Science. 1918, 11: 107–135.
• Freedman, David A.; Pisani, Robert; Purves, Roger (2007) Statistics, 4th edition. W.W. Norton & Company ISBN 978-0-393-92972-0
• Hettmansperger, T. P.; McKean, J. W. Edward Arnold, 编. Robust nonparametric statistical methods. Kendall's Library of Statistics. Volume 5 First. New York: John Wiley & Sons, Inc. 1998: xiv+467 pp. ISBN 0-340-54937-8. MR 1604954.
• Lentner, Marvin; Thomas Bishop. Experimental design and analysis Second. P.O. Box 884, Blacksburg, VA 24063: Valley Book Company. 1993. ISBN 0-9616255-2-X.
• Tabachnick, Barbara G. & Fidell, Linda S. (2007). Using Multivariate Statistics (5th ed.). Boston: Pearson International Edition. ISBN 978-0-205-45938-4
• Wichura, Michael J. The coordinate-free approach to linear models. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge: Cambridge University Press. 2006: xiv+199. ISBN 978-0-521-86842-6. MR 2283455.