Z-Score Normalization
Measure how far each value lies above or below the dataset average.
Z-Score Normalization explained visually
Visit a shipping center to understand means, standard deviations, and standardized values.
What you will learn
Diagnose underfitting, understand bias and variance, and prepare features with normalization.
Center values on the mean
Z-score normalization begins by subtracting the dataset mean from each value.
Measure distance using the spread
Dividing by the standard deviation expresses distance from the mean in shared units of variation.
Read the sign
A negative z-score is below the mean, a positive z-score is above it, and a value near zero is close to average.
Choose the method for the data
Unlike min-max values, z-scores are not restricted to zero through one. The data distribution and deployment needs should guide the choice.
Quick check: test your understanding
What does a z-score near zero mean?
The value is close to the dataset mean.
What does a negative z-score mean?
The value lies below the mean.
Are z-scores limited to zero through one?
No. They can be negative or positive.
Accessible referenceLesson 27 transcript333 words · Matches the published narration and captionsOpen transcript
Min-max normalization describes where a value lies between the minimum and maximum. Z-score normalization asks a different question: how far is this value from the average? Imagine measuring package weights at a shipping center. A package weighing ten kilograms may be ordinary in one facility and unusually heavy in another. The number alone does not provide the complete context.
A z-score compares the value with the dataset's mean and standard deviation. We subtract the mean from the original value and divide by the standard deviation. Consider the values ten, fifteen, eight, twelve, and eighteen. Their mean is twelve point six. Their standard deviation is approximately three point five six.
For the value ten, we subtract twelve point six and divide by three point five six. The result is approximately negative zero point seven three. The negative sign means the value is below the mean. For eighteen, the result is approximately positive one point five two. This tells us that eighteen lies about one and a half standard deviations above the mean.
After z-score normalization, the transformed dataset has a mean near zero and a standard deviation near one. Unlike min-max normalization, z-scores do not remain between zero and one. They can be negative or positive. Their magnitude tells us how unusual each value is relative to the dataset.
Z-score normalization is often more practical when data does not have a meaningful fixed minimum or maximum. It is also less controlled by the range alone, although extreme outliers can still influence the mean and standard deviation. Min-max scaling provides an intuitive bounded interval. Z-score normalization provides information about distance from the average.
Neither method is universally superior. We select the method based on the distribution of the data and the needs of the model. Numbers such as scores and package weights are not the only values we normalize. Images contain millions of numerical pixel values. In Lesson 28, we will normalize image pixels and then explore how smoothing reveals useful patterns inside noisy signals.