Agenda
<aside> 📌 Reminders
Final Tutorial today
Final Exam December 12, 2024 </aside>
Regression is a statistical method used to model the relationship between two variables:
Goal: Find an equation that best describes how $Y$ changes with $X$.
$$ Y = b_0 + b_1X $$
Where:
$$ b_1 = \frac{\sum{(X_i - \bar{X})(Y_i - \bar{Y})}}{\sum{(X_i - \bar{X})^2}} $$
Intercept ($b_0$):
$$ b_0 = \bar{Y} - b_1\bar{X} $$
Where:
Residuals:
The residual for a data point is the difference between the observed and predicted values:
$$ \text{Residual} = Y_i - \hat{Y}_i $$
A good regression line minimizes the sum of squared residuals.
Minimizing Error:
The least squares method ensures that the total error, measured as:
$$ \text{Sum of Squared Errors (SSE)} = \sum{(y_i - \hat{y}_i)^2} $$
is as small as possible.
Assumptions: