The Mountain Path Academy
Simple Linear Regression & Model Diagnostics
Fit an OLS line, test the slope, read R² and the ANOVA F-test, predict with confidence and prediction intervals, and check the residuals.
THE MOUNTAIN PATH ACADEMYFinance · Risk Management · Quantitative Analytics
Simple Linear Regression & Model Diagnostics
OLS estimation, t-tests and p-values, R² and ANOVA, prediction intervals and residual checks
Ŷ = –
Slope b1–
Intercept b0–
R² (fit)–
F-statistic–
Scatter plot and fitted OLS line
ObservationsFitted line95% CI for the meanPrediction at X₀
Observations
Coefficient table (two-sided tests, df = n − 2)
Predict at a chosen X
Whiteboard working
Plain-English interpretation
Residuals vs fitted values
Look for random scatter around zeroANOVA table
Fitted values and residuals
1 · Linear conditional meanE(Y | X) = β0 + β1X. Check the scatter plot: a curved pattern in the residuals means a straight line is the wrong shape.
2 · Constant error varianceVar(ε | X) is the same at every X (homoscedasticity). A funnel in residuals vs fitted values makes the usual standard errors unreliable.
3 · Independent errorsNo autocorrelation, which matters most for time series. A Durbin–Watson value near 2 is reassuring; well below 2 signals positive autocorrelation.
4 · Normal errors (small samples)Needed for exact t and F tests when n is small. With larger samples the tests rely less on normality.
Reading a p-valueThe probability of a slope at least this far from zero if β1 were really zero. It is not the probability that the null is true, and significance is not proof of causation.
Useful identitiesIn SLR, F = tb1², R² = r², and the CI for the mean is narrower than the prediction interval for a new observation, which adds the error variance.
Prof. V. Ravichandran · The Mountain Path Academy
How to use this tool: pick a dataset or type your own points, read the coefficient table and the whiteboard working, then open the residuals tab to check the assumptions. The theory is in Simple Linear Regression →
Teaching tool with illustrative data; not investment advice. https://themountainpathacademy.com