Source | SS | df | $\mathbb{E}(MS)$ |

Treatment | $SSTR=\sum_{i=1}^r n_i \left(\overline{Y}_{i\cdot} - \overline{Y}_{\cdot\cdot}\right)^2$ | r-1 | $\sigma^2 + \frac{\sum_{i=1}^r n_i \alpha_i^2}{r-1}$ |

Error | $SSE=\sum_{i=1}^r \sum_{j=1}^{n_i}(Y_{ij} - \overline{Y}_{i\cdot})^2$ | $\sum_{i=1}^r (n_i - 1)$ | $\sigma^2$ |

Variable | Description |

Days | Duration of hospital stay |

Weight | How much weight is gained? |

Duration | How long under treatment for kidney problems? (two levels) |

Source | SS | df | $\mathbb{E}(MS)$ |

A | $SSA=nm\sum_{i=1}^r \left(\overline{Y}_{i\cdot\cdot} - \overline{Y}_{\cdot\cdot\cdot}\right)^2$ | r-1 | $\sigma^2 + nm\frac{\sum_{i=1}^r \alpha_i^2}{r-1}$ |

B | $SSB=nr\sum_{j=1}^m \left(\overline{Y}_{\cdot j\cdot} - \overline{Y}_{\cdot\cdot\cdot}\right)^2$ | m-1 | $\sigma^2 + nr\frac{\sum_{j=1}^m \beta_j^2}{m-1}$ |

A:B | $SSAB = n\sum_{i=1}^r \sum_{j=1}^m \left(\overline{Y}_{ij\cdot} - \overline{Y}_{i\cdot\cdot} - \overline{Y}_{\cdot j\cdot} + \overline{Y}_{\cdot\cdot\cdot}\right)^2$ | (m-1)(r-1) | $\sigma^2 + n\frac{\sum_{i=1}^r\sum_{j=1}^m (\alpha\beta)_{ij}^2}{(r-1)(m-1)}$ |

Error | $SSE = \sum_{i=1}^r \sum_{j=1}^m \sum_{k=1}^{n}(Y_{ijk} - \overline{Y}_{ij\cdot})^2$ | (n-1)mr | $\sigma^2$ |

Source | SS | df | $\mathbb{E}(MS)$ |

Treatment | $SSTR=\sum_{i=1}^r n_i \left(\overline{Y}_{i\cdot} - \overline{Y}_{\cdot\cdot}\right)^2$ | r-1 | $\sigma^2_{\epsilon} + n \sigma^2_{\alpha}$ |

Error | $SSE=\sum_{i=1}^r \sum_{j=1}^{n_i}(Y_{ij} - \overline{Y}_{i\cdot})^2$ | $\sum_{i=1}^r (n_i - 1)$ | $\sigma^2_{\epsilon}$ |