Logo

Resources for students in Stat 111 (Spring 2023). Managed by aL Xin.

View files on GitHub awqx/stat111-2023

Sections
Lectures
Exam materials
R Bootcamp
Syllabus

Section 05 - Regression

09 Mar 2023


Predictive regression

\[\mu(\vec{x}) = \mathbb{E}[Y \mid \vec{X} = \vec{x}]\] \[U(\vec{x}) = Y - \mathbb{E}[Y \mid \vec{X} = \vec{x}] = Y - \mu(\vec{x})\] \[R^2 = \frac{Var(\mu(\vec{X}))}{Var(Y)} = 1 - \frac{Var(U(\vec{X}))}{Var(Y)}\]

Linear regression

\[\mu(\vec{x}) = \mathbb{E}[Y \mid \vec{X} = \vec{x}. \vec{\theta}] = \theta_0 + \theta_1 x_1 + \cdots + \theta_K x_K\]

Logistic regression

\[\mu(x) = P(Y = 1 | X = x) = \frac{e^{\theta x}}{1 + e^{\theta x}}\] \[L(\theta) = \prod_{j = 1}^n \left( \frac{e^{\theta x_j}}{1 + e^{\theta x_j}} \right)^{y_j} \left( \frac{1}{1 + e^{\theta x_j}} \right)^{1 - y_j}\]

Statistical models for predictive regression

\[\hat\theta_{MLE} = \textrm{arg} \max_\theta \sum_{j = 1}^n \log f(y_j \mid \vec{X}_j = \vec{x}_j, \vec\theta)\] \[\hat\theta_{MLE} = \frac{\sum_{j = 1}^n x_j Y_j}{ \sum_{j = 1}^n x_j^2}\]

Least squares

\[\hat\theta_{LS} = \textrm{arg} \min_\theta \left( \sum_{j = 1}^n (Y_j - \theta x_j)^2 \right) = \frac{\sum_{j = 1}^n x_j Y_j}{ \sum_{j = 1}^n x_j^2}\]

Problems

1 Which of the following is a linear regression?

  1. $\mu(\vec{x} \mid \vec{\theta}) = \theta_1 \exp(x_1 + x_2) + \theta_2 x_1$
  2. $\mu(\vec{x} \mid \vec{\theta}) = \theta_1 \theta_2 x_1$
  3. $\mu(\vec{x} \mid \vec{\theta}) = \theta_1 x_1 x_2 + \theta_2 x_2 x_3$
  4. $\mu(\vec{x} \mid \vec{\theta}) = \exp(\theta_1 x_1 + \theta_2 x_2)$
  5. $\mu(\vec{x} \mid \vec{\theta}) = \theta_1 (2x_1 + 4)$

2 Linear regression model

Assume a model

\[Y_j \mid X_j = x_j, \vec{\theta} \sim \mathcal{N}(\theta_0 + \theta_1 x_j, \sigma^2)\]

Assume that $\sigma^2$ is known.

2.1 MLE

Let $\hat\theta_0, \hat\theta_1$ be the MLEs for the parameters. What are the MLEs?

2.2 MLE distribution

What is the distribution of $(\hat\theta_0, \hat\theta_1)$?

2.3 Independence of sample mean and MLE

Show that $\bar{Y} \perp \hat\theta_1$. Hint: Ex. 7.5.9 in STAT 110.

2.4 Find a 95% CI for $\mu(x_0) = \theta_0 + \theta_1 x_0$

Hint: construct a pivot based on $\hat{Y}$.