Formulas, Statistical Tables and R Commands: Formulas
Formulas analysis of variance (ANOVA)
One-way ANOVA
Sums of squares for #y#
With subscript #i# for participants/observations and #j# for groups, the total sum of squares of #y# can be expressed as \begin{eqnarray*} \sum_{j=1}^g\limits \sum_{i=1}^{n_g}\limits (y_{ij}-\overline{y})^2 = & \sum_{j=1}^g\limits n_j(\overline{y}_j-\overline{y})^2 & + \sum_{j=1}^g\limits \sum_{i=1}^{n_g} \limits (y_{ij}-\overline{y}_j)^2 \\ SS_{tot} = & SS_{between} & + \text{ } SS_{within}, \end{eqnarray*} where #SS_{between}# is the sum of squares of the differences between groups, #SS_{within}# the sum of squares of the differences within the groups, #n_j# the number of observations in group #j# and #g# the number of groups.
#F#-test ANOVA
\begin{equation*} F=\frac{MS_{between}}{MS_{within}}=\frac{SS_{between}/(g-1)}{SS_{within}/(n-g)}=\frac{\Big(\sum_{j=1}^g\limits n_j(\overline{y}_j-\overline{y})^2\Big) / (g-1)}{\Big(\sum_{j=1}^g\limits \sum_{i=1}^{n_g} \limits (y_{ij}-\overline{y}_j)^2\Big)/(n-g)}, \end{equation*} with #df_1=g-1# and #df_2=n-g#, where #n# the total number of observations, #g# the number of groups, and #n_j# the number of observations in group #j#.
#F#-test ANOVA - equal group sizes
\begin{equation*} F=\frac{MS_{between}}{MS_{within}}=\frac{\Big(n_c\sum_{j=1}^g\limits (\overline{y}_j-\overline{y})^2\Big) / (g-1)}{\Big(\sum_{j=1}^g \limits {s_j^2}\Big)/g} \end{equation*} with #df_1=g-1# (between) and #df_2=n-g# (within) degrees of freedom, where #n_c# denotes the number of observations in each group (#n_1=n_2=\cdots=n_g=n_c#).
Proportion explained variation (eta#^2#)
\begin{equation*} \eta^2=\frac{SS_{between}}{SS_{tot}}=1-\frac{SS_{within}}{SS_{tot}} \end{equation*}
Effect sizes ANOVA
\begin{equation*} f = \sqrt{\frac{SS_{between}}{SS_{within}}}=\sqrt{\frac{\eta^2}{1-\eta^2}} \end{equation*}
- #f=0.10# small effect
- #f=0.25# medium effect
- #f=0.40# large effect
#100(1-\alpha)\%# - confidence interval post hoc comparisons groups #j# and #k#
\begin{equation*} (\overline{y}_j-\overline{y}_k)-t_{\alpha/2}\cdot se_{\overline{y}_j-\overline{y}_k}\le (\mu_j-\mu_k) \le(\overline{y}_j-\overline{y}_k)+t_{\alpha/2}\cdot se_{\overline{y}_j-\overline{y}_k}, \end{equation*} with \begin{equation*} se_{\overline{y}_j-\overline{y}_k}= \sqrt{\frac{SS_{within}}{n-g}\Big(\frac{1}{n_j}+ \frac{1}{n_k}\Big)},\end{equation*} where #n# is the #{\bf total}# sample size, #g# is the #{\bf total}# number of groups and #df=(n-g)# are the degrees of freedom associated with #MS_{within}#.
Two-way ANOVA
Sums of squares for #y#
With factors #A# and #B# the total sum of squares of #y# can be expressed as \begin{eqnarray*} SS_T = SS_A+SS_B+SS_{AB}+SS_{within}. \end{eqnarray*}
Mean sums of squares for #y# (mean squares)
With #a# levels for factor #A# and #b# levels for factor #B# the mean squares are \begin{eqnarray*} MS_A & = & SS_A/(a-1) \\ MS_B & = & SS_B/(b-1) \\ MS_{AB} & = & SS_{AB}/((a-1)(b-1)) \\ MS_{within} & = & SS_{within}/(n-ab) \end{eqnarray*} #\textbf{NB}# #MS_{within}# is also referred to as #MS_{error}#.
#F#-test interaction #A\times B#
\begin{equation*} F=MS_{AB}/MS_{within} \end{equation*} with #df_1=(a-1)(b-1)# and #df_2=n-ab# (also: #df_{AB}# and #df_{error}#)
#F#-test main effect #A#
\begin{equation*} F=MS_{A}/MS_{within} \end{equation*} with #df_1=a-1# and #df_2=n-ab# (also: #df_A# and #df_{error}#).
#F#-test main effect #B#
\begin{equation*} F=MS_{B}/MS_{within} \end{equation*} with #df_1=b-1# and #df_2=n-ab# (also: #df_B# and #df_{error}#).