Linear regression
January 24, 2025
For this class you will need to be able to…
Properly write mathematical symbols, e.g., \(\beta_1\) not B1, \(R^2\) not R2
Write basic regression equations, e.g., \(\hat{y} = \beta_0 + \beta_1x_1 + \beta_2x_2\)
Write matrix equations: \(\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}\)
Write hypotheses (we’ll start this next week), e.g., \(H_0: \beta = 0\)
You are welcome to but not required to write math proofs using LaTex.
Inline: Your mathematics will display within the line of text.
Use $ to start and end your LaTex syntax. You can also use the menu: Insert -> LaTex Math -> Inline Math.
Example: The text The linear regression model is $\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}$ produces
The linear regression model is \(\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}\)
Display: Your mathematics will display outside the line of text
Use a $$ to start and end your LaTex syntax. You can also use the menu: Insert -> LaTex Math -> Display Math.
Example: The text The estimated regression equation is $$\hat{\mathbf{y}} = \mathbf{X}\hat{\boldsymbol{\beta}}$$ produces
The estimated regression equation is
\[ \hat{\mathbf{y}} = \mathbf{X}\hat{\boldsymbol{\beta}} \]
Tip
Click here for a quick reference of LaTex code.
Describe the relationship between the price and width of Ikea sofas, armchairs, and bookcases/shelving.
Today’s lab focuses on using simple and multiple linear regression to understand variability in coffee quality ratings.