STAT1003 – Statistical Techniques
Dr. Emi Tanaka
Australian National University
These slides are best viewed on a modern browser like Google Chrome on a desktop or laptop. Some interactive components may require some time to fully load.
treatment.\[y_{ij} = \beta_0 + \beta_{1i} + \epsilon_{ij}, \qquad \epsilon_{ij}\stackrel{iid}{\sim} N(0, \sigma^2).\]
lm() uses the treatment constraint, where the first level of the factor is the reference level (i.e. \(\beta_{11} = 0\)).contr.sum contrast in R.| Source of variation | Degrees of freedom | Sum of squares | Mean square | F-value | P-value |
|---|---|---|---|---|---|
| Between groups | \(t-1\) | \(\text{Between SS}\) | \(MS_{between} = \frac{\text{Between SS}}{t-1}\) | \(f = \frac{MS_{between}}{MS_{within}}\) | \(P(F_{t- 1, n - t} > f)\) |
| Within groups | \(n-t\) | \(\text{Within SS}\) | \(MS_{within} = \frac{\text{Within SS}}{n-t}\) | ||
| Total | \(n-1\) | \(\text{Total SS}\) |
If \(X = Z_1^2 + \cdots + Z_k^2\) where \(Z_1, \ldots, Z_k\) are independent \(N(0, 1)\) variables, then \(X\) is said to have a chi-squared distribution with \(k\) degrees of freedom, denoted by \(\chi^2_k\).
If \(F = \dfrac{X_1 / k_1}{X_2 / k_2}\) where \(X_1 \sim \chi^2_{k_1}\) and \(X_2 \sim \chi^2_{k_2}\), then \(F\) is said to have an F-distribution with \(k_1\) and \(k_2\) degrees of freedom, denoted by \(F_{k_1, k_2}\).
Source: xkcd

STAT1003 – Statistical Techniques