MBiol2 2025 TT: Nature Recovery in the UK
Lecturer:
Dr Tin Hang (Henry) Hung 洪天恒 [email protected]
Fulford Fellow in Biology, Somerville College
Lecturer in Biology, St Hilda’s College
<aside>
❗ Make sure you have downloaded and installed R (and R Studio) in your laptop.
</aside>
Before the session
- [ ] These are the R libraries we need to use today. Load these libraries into your R session.
library(tidyverse)
library(ggplot2)
library(lme4)
library(car)
- [ ] If you have not, you can install them by
install.packages(”library_name”), such as install.packages("tidyverse").
Analysis of variance (ANOVA)
⌛ 15 min
- $H_0$: Population means $\mu_i$ are the same for all groups
- $H_1$: Population means $\mu_i$ are not the same for all groups (at least one is different from the others)
- Even $H_0$ is true, sample means $\bar Y_i$ still differ from each other solely because of sampling error
- Taking a random sample from each population is equivalent to taking the same number of samples from a single population
- If $H_0$ is not true, variation in sample means attributable to chance still exists, but there is an additional component caused by real variation among population means

Partitioning the sum of squares
$$
Y_{ij}-\bar Y=(Y_{ij}-\bar Y_i)+(\bar Y_i-\bar Y)
$$