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

Lecture 14 - Post-midterm, regression

09 Mar 2023


Midterm details

Midterm review

Bird chirps

Gamma CI

Regression

Gaussian linear regression

\[\begin{aligned} Y | X &\sim \mathcal{N}(\theta_0 + \theta_1 X, \sigma^2) \\ \epsilon &= Y - \theta_0 - \theta_1 X \\ \mathbb{E}[Y|X] &= \theta_0 + \theta_1 X \end{aligned}\] \[\hat\theta = \frac{ \sum_{j = i}^n X_j Y_j }{ \sum_{j = 1}^n X_j^2 }\] \[\textrm{Cov}(Y, X) = \textrm{Cov}(\theta X, X) + \textrm{Cov}(\epsilon, X) \to \theta = \frac{\textrm{Cov}(X, Y)}{\textrm{Var}(X)}\] \[\theta = \frac{ \sum_{j = i}^n (X_j - \bar X)(Y_j - \bar Y) }{ \sum_{j = 1}^n (X_j - \bar X)^2 }\]

Logistic regression

\[\mu(x) = \mathbb{E}[Y | X = x] = P(Y = 1 | X = x)\] \[\textrm{logit}(p) = \log \left( \frac{p}{1 - p} \right), \textrm{logit}^{-1}(p) = \frac{e^x}{1 + e^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}\]