2.1 A simple regression: one explanatory variable

We will start by regressing stack loss against air flow. In R using the lm() function this is

# the dat data.frame is defined on the first page of the
# chapter
lm(stack.loss ~ Air.Flow, data = dat)

This fits the following model for the \(i\)-th measurment: \[\begin{equation} \tag{2.1} stack.loss_i = \alpha + \beta air_i + e_i, \text{ where } e_i \sim \text{N}(0,\sigma^2) \end{equation}\] We will write the model for all the measurements together in two different ways, Form 1 and Form 2.