Understand the basic concepts of linear models, including the definition of linear relationships, the use of independent and dependent variables, and the purpose of linear models in data analysis.
Introduction to Linear Models
Key concepts, assumptions, and typical applications
A linear model expresses a response (dependent) variable (Y) as a linear combination of one or more predictor (independent) variables (X_1, X_2, \dots , X_p) plus an error term:
[ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \dots + \beta_p X_p + \varepsilon ]
The model is linear in the parameters (\beta), not necessarily in the raw predictors (e.g., you can include (X^2) or (\log X) as a predictor and still have a linear model).
| Model | Formulation | Typical Use |
|---|---|---|
| Simple Linear Regression | (Y = \beta_0 + \beta_1 X + \varepsilon) | One predictor, continuous outcome. |
| Multiple Linear Regression | (Y = \beta_0 + \sum_{j=1}^{p}\beta_j X_j + \varepsilon) | Several predictors, continuous outcome. |
| Analysis of Variance (ANOVA) | (Y = \mu + \tau_i + \varepsilon) (categorical predictors) | Compare means across groups. |
| Analysis of Covariance (ANCOVA) | Combination of ANOVA + regression terms | Adjust group comparisons for covariates. |
| General Linear Model (GLM) | (\mathbf{Y}= \mathbf{X}\boldsymbol\beta + \boldsymbol\varepsilon) (matrix notation) | Unified framework for all above; facilitates estimation and inference. |
| Generalized Linear Model (extension) | Links a non‑normal response distribution (e.g., logistic, Poisson) to a linear predictor | Binary, count, or other non‑continuous outcomes. |
The focus here is on the classical (Gaussian) linear model.
Using vectors/matrices simplifies notation and computation.
[ \mathbf{y}= \mathbf{X}\boldsymbol\beta + \boldsymbol\varepsilon ]
Ordinary Least Squares (OLS) estimate:
[ \hat{\boldsymbol\beta}= (\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{X}^\top \mathbf{y} ]
provided (\mathbf{X}^\top \mathbf{X}) is invertible (full column rank).
| Assumption | Description | Diagnostic Tools |
|---|---|---|
| Linearity |