top of page
Linear Regression

Linear Regression

$49.00Price

You can already ask an AI to write you a linear regression. The problem is knowing whether the coefficients mean anything — or whether you've fit a straight line to a curved relationship, let two collinear predictors split a coefficient into nonsense, or let a single outlier drag the whole line toward it. The software returns an R² and a set of coefficients either way. This is the course that gives you that judgment.


Five parts, one algorithm, no gaps:

  • Part 1 — Intro. How least squares finds the line — or hyperplane — that minimizes the sum of squared residuals, and why this is the rare model with a closed form: an exact answer from algebra, no iteration, no tuning. The geometry underneath it — projecting your data onto the space your predictors can reach — and what the coefficients actually claim about the world. The intuition before the notation.

  • Part 2 — By Hand. A complete worked example, start to finish: compute the means, the deviations, the slope and intercept from the sums of products, then the residuals, R², and the standard error that tells you whether the slope is a real effect or noise. Every product and every sum on the page. Nothing waved away, nothing left "as an exercise." You prove the algorithm to yourself.

  • Part 3 — In Excel. The same example built out in a spreadsheet you can open and poke at, residuals plotted beside the fit, so you watch the line settle onto the data — and see for yourself what one outlier, or a genuinely nonlinear relationship, does to the coefficients and to R².

  • Part 4 — In Python. A clean, executable, verified reference implementation — both the normal-equations solution built from scratch and the library call, so you have a known-good result to check any other code against.

  • Part 5 — With AI. A tested prompt that directs an AI assistant to carry this same algorithm to your problem, plus the understanding to catch it when it's wrong.


By the end you won't just have working code. You'll have followed the algorithm from first principles through a hand calculation, a spreadsheet, and production Python — so when you point an AI at your own data, you'll know how to check the assumptions the model rests on, read the coefficients and their standard errors, spot multicollinearity and influential points, and tell when the fit is real rather than a number the software will always hand back.


Written for practicing engineers and STEM professionals who'd rather understand a method than trust a black box.

    bottom of page