4.9.23 · D1Probability Theory & Statistics

Foundations — Multiple regression

2,786 words13 min readBack to topic

This page assumes you have seen nothing. We name every symbol the parent note Multiple regression uses, draw the picture behind it, and say why the topic cannot live without it. Read top to bottom; each block only uses symbols already built above it.


1. A data point, and the subscript

Before any formula, we need to talk about one observation and how we count many of them.

Why we need it: regression compares a prediction to a truth for every single row, then adds up the mistakes. Without a counter we could not say "the mistake on row 3".

Figure — Multiple regression

2. Predictor and response (the raw ingredients)

These are just the measured numbers — nothing is chosen or fitted yet. Next we will combine them, but to do that we first need to introduce the numbers we are allowed to tune.


3. The Greek letters and , and the word "linear"

Now that we have both the fixed inputs and the tunable dials , we can finally combine them.

Why both matter: the 's are what we solve for; the 's are what we try to make small. The whole game is choosing 's so the 's shrink.


4. The residual and "sum of squares"

The error is invisible (we do not know the true surface). What we can measure once we pick 's is the residual.

Figure — Multiple regression

5. Vectors and matrices — why stack the numbers

Writing separate equations is exhausting. We bundle numbers into grids.

With , , and all defined, the equations collapse into one tidy line:


6. Matrix multiplication, transpose, and length

Three operations power the whole derivation. We define each with its picture.

Figure — Multiple regression

7. The dot product and perpendicularity


8. From "minimise " to the normal equations — the actual derivation

We now earn the condition that figure s03 showed geometrically. Recall .


9. The inverse — how we isolate


10. Averages, variance, and the sums , ,

The last symbols measure how good the fit is.

The ratio (the fraction explained) is built entirely from these — the topic Coefficient of Determination.


Prerequisite map

Observation index i and n

Response y and predictors x

Beta dials and linear combination

Epsilon error

Residual and sum of squares S

Vectors beta and epsilon and design matrix X

Matrix product transpose norm

Dot product and perpendicular

Normal equations

Matrix inverse

Mean and sums of squares SST SSE SSR

Multiple Regression estimator

Every arrow means "you must understand the source box before the target makes sense." The final box is the parent topic Multiple regression, which also opens the door to Gauss–Markov Theorem and Positive Semidefinite Matrices.


Equipment checklist

Read the left side, answer out loud, then reveal.

What does the subscript in count?
Which observation (row) we mean; it runs to .
What does "linear" force the fitted surface to be?
Flat — no curves, no squared or product terms of the inputs.
What is a residual ?
The vertical gap between a real point and the fitted surface.
Why do we square the residuals before adding?
To stop positives and negatives cancelling, punish big misses, and keep the total smooth for calculus.
What does the leading column of 1's in do?
Multiplies the intercept so it appears in every row's prediction.
What is the parameter vector ?
The column stacking all coefficients (length ).
What does the transpose do?
Flips rows into columns so shapes line up for multiplication.
When are two vectors perpendicular in terms of the dot product?
When their dot product equals zero.
What condition do the normal equations state geometrically?
The residual is perpendicular to every column of : .
Why does left-multiplying by isolate ?
Because and .
When does fail to have an inverse?
When predictor columns are redundant (perfect collinearity).
State the identity linking the three sums of squares (least-squares fit).
(total = explained + leftover).