Loading notebook runner...
Module 2
Compute the OLS slope, intercept, residual sum of squares, and R-squared step by step.
Related dataset
wage_sample.csv
Estimated time
25 to 40 min
Packages
pandas, numpy, statsmodels, patsy
Expected output
A regression or inference table with coefficients, uncertainty, and short interpretation notes.
Learning goals
Common errors
Dataset path helper
import pandas as pd
df = pd.read_csv("/data/wage_sample.csv")
df.head()