Skip to content

ANOVA calcs 2

Download: ANOVA_Calcs2_init.xlsx

Introduction

ANOVA partitions the total variability into two types: between-group and within-group variability: SST=SSB+SSW\text{SS}_T = \text{SS}_B + \text{SS}_W where

SST=∑(xi−x‾)2SSW=∑SSiSSB=∑ni(x‾i−x‾)2 \begin{align*} \text{SS}_T &= \sum (x_i - \overline{x})^2 \\ \text{SS}_W &= \sum \text{SS}_i \\ \text{SS}_B &= \sum n_i (\overline{x}_i - \overline{x})^2 \end{align*}

The sum of squared deviations of the group means x‾i\overline{x}_i from the overall (grand) mean x‾\overline{x} is scaled by multiplying by the number of measurements in each group. This is so that the between-group variability is “applied” to each observation rather than each group.

The between-group mean square, MSB=SSBk−1\text{MS}_B = \frac{\text{SS}_B}{k-1} (where kk is the number of groups), estimates the following population parameter

MSB →estimatesn0σB2+σW2n0=∑wini=∑(1−ni/Nk−1)ni \begin{align*} \text{MS}_B &\ \xrightarrow{\text{estimates}} n_0 \sigma_B^2 + \sigma_W^2 \\ n_0 &= \sum w_i n_i = \sum \left( \frac{1 - n_i / N}{k-1} \right) n_i \end{align*}

In this equation, n0n_0 is the effective group size, a weighted average that is usually very close to the (unweighted) average group size.

If all groups have the same number of measurements nn then we can simplify the expression to SSB=n∑(x‾i−x‾)2\text{SS}_B = n \sum (\overline{x}_i - \overline{x})^2 and n0=nn_0 = n. This is called a balanced design ANOVA and is preferred for a few reasons:

  • it makes it easier to detect (in a statistical sense) the presence of between-group variability. In other words, it maximizes the statistical power of ANOVA
  • it makes ANOVA more robust to deviations from the assumptions of normality and homogeneous variance

But unbalanced designs happen all the time; for example, individual trials/observations/measurements can go awry or data are simply missing. In such cases the effective group size, which is slightly less than the average group size, is the scaling factor that accounts for the contribution of the between-group variance to MSB\text{MS}_B.

Learning Goals

  • Understand the advantages of balanced designs in ANOVA
  • Learn how to create dynamic named ranges in Excel

Tasks

  • Make the following named ranges dynamic: Group, xbar_i, s_i
  • Make the following named ranges dynamic: ANOVA_data, n_i
  • Calculate w_i column and name it
  • Calculate effective group size n0n_0 and interpret its meaning
  • Examine the effects of balanced vs unbalanced designs for different values of kk

By the end of the screencast your spreadsheet should look something like the image below.

Unbalanced simulated ANOVA data with 6 groups of 2 to 4 values, group means and weights, and an ANOVA table with F = 16.9