Standardization vs Min-Max Scaling
Two common ways to rescale a numeric feature before feeding it to a model — subtracting the mean and dividing by standard deviation, versus squeezing values into a fixed [0, 1] range — behave very differently in the presence of outliers and should be chosen deliberately, not by default.
Prerequisites: Standard Deviation
Many models — anything that computes distances, dot products, or gradients across features with different natural scales — are sensitive to the raw units a feature happens to be measured in. A feature ranging from 0 to 1,000,000 (say, market cap in dollars) will numerically dominate a feature ranging from -1 to 1 (say, a momentum z-score) in any distance-based or gradient-based calculation, even if the momentum feature is far more predictive. Rescaling features onto a common footing before training is standard practice, and the two most common ways to do it — standardization and min-max scaling — make very different assumptions about what "common footing" should mean.
The two transformations, in words
Standardization (also called z-scoring) subtracts the feature's mean and divides by its standard deviation:
In plain English: after standardization, a feature has mean 0 and standard deviation 1, and a value of means "two standard deviations above the average," regardless of the feature's original units. The transformed values are not bounded to any fixed range — a genuine extreme value stays extreme, just measured in standard-deviation units instead of raw units.
Min-max scaling instead maps the feature linearly onto a fixed range, usually :
In plain English: the smallest value in the data becomes exactly 0, the largest becomes exactly 1, and everything else is placed proportionally in between. Every rescaled value is guaranteed to land inside , by construction.
Why the outlier behavior differs so much
Min-max scaling anchors its entire range to just two numbers: the minimum and the maximum. A single extreme outlier — one $50 million trade where every other trade is under $500,000 — becomes the new maximum, and every other value gets compressed into a tiny sliver near 0. Standardization is less extreme (an outlier inflates the standard deviation, pulling other z-scores toward 0), but not immune — a heavy enough outlier still distorts the scale for everyone.
Worked example: one extreme value, two treatments
Suppose a feature (daily trade notional, in $000s) has 99 values clustered between 10 and 200, plus one outlier at 5,000. Min-max scaling maps the outlier to exactly 1.0 and squeezes the 99 normal values into the tiny range roughly — they've lost almost all their relative spread. Standardization, with a mean pulled up to about 59 and a standard deviation inflated to around 495, maps the 99 normal values to z-scores mostly between and — still compressed, but nowhere near as severely collapsed as the min-max version, and the outlier itself sits at a z-score around 10, clearly flagged as extreme rather than silently becoming the new "1.0."
Standardization is built around exactly the mean-and-standard-deviation description shown in the explorer above — a feature is described by how many standard deviations a value sits from the center, which is a more outlier-aware framing than "where does this fall between the smallest and largest value seen."
What this means in practice
Min-max scaling is a reasonable default only when you're confident the feature has no meaningful outliers and its true range is well known and stable (for example, a feature that's already a bounded ratio or percentage). Standardization is the safer general-purpose choice for financial features, which are routinely fat-tailed, but when outliers are severe enough to distort even the mean and standard deviation, neither is ideal — robust scaling using the median and interquartile range is usually the better choice.
Standardization rescales a feature using its mean and standard deviation (unbounded output, moderately robust to outliers); min-max scaling rescales using only the minimum and maximum (output guaranteed in a fixed range, but highly sensitive to a single extreme value, which can compress every other observation into a narrow sliver). Choose based on how confident you are that the feature's extremes are representative, not by default.
Never fit the scaling parameters (mean/std, or min/max) on the full dataset including the test or validation set — this leaks information about data the model shouldn't have seen yet. Fit the scaler on the training set only, then apply the same fitted transformation to validation and test data, exactly as you would with any other trained model parameter.
Related concepts
Practice in interviews
Further reading
- Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 3