Least squares by hand: fuel economy against weight for 32 cars (mtcars)
intercept β̂₀ (mpg at weight 0)
slope β̂₁ (mpg per 1,000 lb)
jump to least squares
the data, your line and its residuals
RSS for every intercept and slope (darker = smaller)
What "95% confidence" means: one interval per simulated data set (true slope 0.5)
sample size n
draw 100 more data sets
interval contains 0.5
interval misses 0.5
true slope
Forward selection on pure noise: 20 predictors that have nothing to do with y (n = 100)
run 200 data sets
reset
R² never falls: one real predictor plus k columns of noise (n = 50, average of 40 data sets)
noise predictors added, k
training R²
adjusted R²
test R² (1,000 new points)