Course contentsShow
← Data Science
Lesson 196 of 2,1456. The Normal Distribution in DepthFree lesson

Calculating Z-Scores from Raw Data

Converting raw data values to z-scores using the formula z = (x - μ) / σ.

Calculating Z-Scores from Raw Data

You'll learn how to convert any raw data value into a standardized z-score that tells you how many standard deviations away from the mean it sits.

The Core Formula

Now that you understand what a z-score represents (a standardized measure of position), it's time to actually calculate them from real data. The formula is straightforward:

z = (x - μ) / σ

Where:

  • x = your raw data value
  • μ (mu) = the mean of your distribution
  • σ (sigma) = the standard deviation of your distribution

How It Works

Think of this as a three-step translation process:

  1. Subtract the mean (x - μ): This centers your data point. You're asking "how far am I from average?"
  2. Divide by the standard deviation (/ σ): This standardizes the distance. You're converting "raw units" into "standard deviation units."

Example

Suppose test scores have a mean (μ) of 75 and standard deviation (σ) of 10. Your friend scored 85 (x = 85).

z = (85 - 75) / 10 = 10 / 10 = 1.0

Your friend scored exactly 1 standard deviation above the mean. If someone else scored 60:

z = (60 - 75) / 10 = -15 / 10 = -1.5

They scored 1.5 standard deviations below the mean (negative z-score means below average).

Why This Matters

Z-scores let you compare apples to oranges. A score of 85 on one test and 92 on another test mean nothing until you standardize them. Once converted to z-scores, you can see which performance was genuinely better relative to each test's distribution.

Key Takeaway: The formula z = (x - μ) / σ transforms any raw data value into a standardized z-score, letting you measure exactly how unusual or typical that value is within its distribution.