Normalization Arithmetic
Normalization Arithmetic
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
Normalization Arithmetic
The chapter normalizes five temperature readings — 18, 22, 25, 19, 21 C — two ways: min-max scaling puts 22 C at 0.571, while z-score places it at 0.408 standard deviations. The two methods disagree on purpose, and a wrong scale silently reweights every downstream model. This audit re-derives the normalization arithmetic at full precision to show why an outlier that pushes the max to 85 collapses that same 0.571 reading.
Companion to the chapter Lab: Feature Scaling — every number here comes from that chapter.
See the relationship before changing it
The figure reads from left to right. The blue card is observed maximum. The middle card applies the page rule. The green card is scaled 22 c reading. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 85 C.
- 2
Name the relationship. scaled value = (22 - 18) / (maximum - 18)
- 3
Substitute with units. (22 - 18) / (85 - 18) = 4 / 67 = 0.0597
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change observed maximum
Try Predict the direction of scaled value = (22 - 18) / (maximum - 18). Test another observed maximum, then compare scaled 22 c reading.
Observe One extreme maximum squeezes every ordinary reading toward zero. Reset observed maximum to 85 and compare scaled 22 c reading.
Explain One extreme maximum squeezes every ordinary reading toward zero.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
The chapter normalizes five temperature readings — 18, 22, 25, 19, 21 C — two ways: min-max scaling puts 22 C at 0.571 , while z-score places it at 0.408 standard deviations. Calculate this case.
This audit re-derives the normalization arithmetic at full precision to show why an outlier that pushes the max to 85 collapses that same 0.571 reading. Check shows this.
The two methods disagree on purpose. Min-max forces 25 C to exactly 1.000, its meaning tied to the observed max; z-score places 25 C at 1.633 standard deviations, its meaning tied to the spread. The audit conclusion is narrow: if a later outlier pushes x_max to 85, the same 22 C reading that scaled to 0.571 here collapses toward (22 - 18) / (85 - 18) = 4 / 67 = 0.059701, about0.060, exposing min-max sensitivity to one extreme. Check confirms it.
Technical boundaries
Excluded from the “Normalization Arithmetic” calculation are future distribution shift, outliers, missing values, leakage from fitting on test data, or whether scaling improves the downstream model; “Normalization Arithmetic” therefore reports only its named fixtures.
Ada: Normalization decides how much each sensor channel is allowed to say, so a wrong scale silently reweights every downstream model. Let me re-derive the worked example above at full precision using only its five readings: 18, 22, 25, 19, 21 (degrees C).
Min-max scaling uses x' = (x - x_min) / (x_max - x_min) with x_min = 18 and x_max = 25, so the range is 25 - 18 = 7:
- 18 C:
(18 - 18) / 7 = 0 / 7 = 0.000000 - 19 C:
(19 - 18) / 7 = 1 / 7 = 0.142857 - 21 C:
(21 - 18) / 7 = 3 / 7 = 0.428571 - 22 C:
(22 - 18) / 7 = 4 / 7 = 0.571429, rounded to0.571. - 25 C:
(25 - 18) / 7 = 7 / 7 = 1.000000.
Z-score uses z = (x - mu) / sigma. The mean is mu = (18 + 22 + 25 + 19 + 21) / 5 = 105 / 5 = 21. The population standard deviation:
- Squared deviations:
(18-21)^2 + (22-21)^2 + (25-21)^2 + (19-21)^2 + (21-21)^2 = 9 + 1 + 16 + 4 + 0 = 30 - Variance:
30 / 5 = 6 sigma = sqrt(6) = 2.449490, rounded to2.449.- For 22 C:
(22 - 21) / 2.449490 = 0.408248, about0.408. - For 25 C:
(25 - 21) / 2.449490 = 1.632993, about1.633.
The two methods disagree on purpose. Min-max forces 25 C to exactly 1.000, its meaning tied to the observed max; z-score places 25 C at 1.633 standard deviations, its meaning tied to the spread. The audit conclusion is narrow: if a later outlier pushes x_max to 85, the same 22 C reading that scaled to 0.571 here collapses toward (22 - 18) / (85 - 18) = 4 / 67 = 0.059701, about 0.060, which is why the chapter reaches for robust scaling when spikes are expected.
Every number above is taken from the chapter’s own material and re-derived step by step.