Foundations — Min-max scaling and z-score normalization
Before you can read the parent note 2.1.5, you need to own every symbol it throws at you. This page builds each one from nothing, in the order they depend on each other. Nothing here assumes you have seen statistics before.
1. A "feature" and its values — the raw material
- (no subscript) = "some value from this column", a stand-in for any one number.
- = "the value in row 3".
- = the count. If ages = [20, 25, 30, 35, 40], then and .
Figure 1 shows this: every value is a dot dropped onto a horizontal number line. A feature is a cloud of dots on a line — read the dot labels along the axis.

Why the topic needs it: scaling changes where these dots sit on the line. You cannot describe "moving the dots" until you can name the dots. That is what and are for.
2. Minimum and maximum — the two edges of the cloud
- For ages [20, 25, 30, 35, 40]: , .
Picture two vertical fence-posts, one at each end of the dot cloud. Everything else lives between them.
Why the topic needs it: min-max scaling works by pinning the left fence-post to and the right fence-post to . To do that you must first find those posts.
3. Range and the difference — the width
- Ages: range .
Picture the length of the rubber band stretched between the two fence-posts.
Why the topic needs it: to squash a cloud of width down into a cloud of width , you divide by its current width. The range is exactly the number you divide by in min-max scaling. Dividing by a width is how you rescale a length — that is the whole trick.
4. Fractions and "fraction of the way" — what division means here
- in ages: top , bottom , ratio → halfway.
Figure 2 makes this literal: stand at the left post (value ), walk right until you reach the right post (value ); each dot's label shows what fraction of the walk it sits at, with landing exactly at .

Why the topic needs it: min-max scaling literally replaces each value by its "fraction of the way" number. Understanding division as "portion of a whole" is the seed of the entire formula.
5. A linear transformation — the reshaping machine
- If and : result .
Picture zooming the ruler in or out; picks the whole ruler up and moves it left or right. No bending — straight lines stay straight, order is preserved (as long as ).
These two views are the same formula — here's the proof. We demand that the machine send the min to and the max to : The first equation gives . Substitute that into the second: Put back into : Now assemble : So the "fraction of the way" ratio from Section 4 and the " machine" are algebraically identical — two names for one transformation. (Notice is exactly one over the range, so it too blows up when the range is — the same degenerate case as before.)
Why the topic needs it: both scaling methods are secretly just "find the right and ". Min-max solves for the that put min→0, max→1. Z-score solves for the that put the mean→0 and spread→1. Once you see them as the same machine with different targets, the two formulas stop looking like magic.
6. Expectation and the mean — the balance point
- Scores [60,70,80,90,100]: .
- is handy because you can write = "the average after transforming", which is how the parent note reasons about scaling.
Picture as the balance point of the dot cloud — the spot where, if the number line were a see-saw with equal weights at each dot, it would tip level.
Why the topic needs it: z-score normalization re-centres the cloud so its balance point sits exactly at . To move a balance point to you subtract from every value. Whenever the parent writes , mentally read it as ", the mean".
7. Variance and standard deviation — the spread
Why square the distances? Because raw distances have plus and minus signs that cancel out (dots left of the mean vs right of it), summing to zero and telling you nothing. Squaring throws away the sign — now every dot contributes a positive "how far out am I" amount. We take the square root at the end to get back to the original units (dollars, not dollars-squared).
Figure 3 contrasts a tight cloud (small ) with a wide one (large ); the arrows mark one measured from the mean line so you can see the "typical step size".

Why the topic needs it: z-score divides by so that "one unit" of the new scale equals "one typical step" of the old cloud. That is what turns an absolute value into "how many steps from average".
8. The z-score — the finished new coordinate
- : at the mean. : one step above. : two steps below.
Picture re-labelling the number line so the mean is the new zero and one is the new "1". The dots don't move relative to each other — only the ruler underneath them changes.
Why the topic needs it: is the output of standardization, just as is the output of min-max. Everything above was built so this one line makes complete sense.
Prerequisite map
Both roads (min-max and z-score) start from the same raw dots and pass through the same machine — they just aim at different targets.
Where these feed next
- The centring-and-scaling idea reappears inside deep nets as 5.3.02-Batch-normalization.
- Scaling is what makes 3.1.02-Gradient-descent-optimization take even steps in all directions.
- Distance and variance thinking powers 4.1.05-Principal-component-analysis and 2.2.01-Feature-selection-methods.
- Outlier-robust cousins of these formulas live in 2.1.06-Robust-scaling-and-power-transforms.
- Before scaling you must have clean, encoded numbers — see 2.1.01-Data-cleaning-techniques and 2.1.04-One-hot-and-label-encoding.
Equipment checklist
Read the question, answer in your head, then reveal.