How to Calculate Z Score Given Two Variables
Use this interactive calculator to compute the z score for two different variables, compare their standardized positions, and visualize where each value sits relative to its own distribution.
Results
Enter both variables and click Calculate Z Scores to see the standardized comparison.
Expert Guide: How to Calculate Z Score Given Two Variables
When people ask how to calculate z score given two variables, they are usually trying to answer a comparison question. The raw values may be measured in different units, have different averages, or have different levels of spread. A z score solves that problem by converting each value into a standardized number that shows how far it sits above or below its own mean in units of standard deviation. Once both variables are standardized, they can be compared fairly.
For a single variable, the z score formula is simple: z = (x – μ) / σ. Here, x is the observed value, μ is the mean, and σ is the standard deviation. If you have two variables, you calculate a separate z score for each one using the correct mean and standard deviation for that variable. Then you compare the two z scores. The variable with the larger positive z score is farther above its mean. The variable with the more negative z score is farther below its mean. If the absolute value is larger, that variable is more unusual relative to its own distribution.
Key idea: you do not usually compute one single z score using both variables together. Instead, you calculate two separate z scores, one for each variable, and then compare them on a common standardized scale.
Why z scores matter when comparing two variables
Suppose a student earns 85 on a math exam and is 172 cm tall. Which performance is more exceptional: the math score or the height? The raw numbers cannot answer that question because they are on different scales. An 85-point exam score and a 172 cm height value are not directly comparable. However, if the exam has a mean of 75 and a standard deviation of 10, the math z score is (85 – 75) / 10 = 1.0. If height has a mean of 165 and a standard deviation of 7, the height z score is (172 – 165) / 7 = 1.0. In this case, both values are exactly one standard deviation above their means, so they are equally exceptional relative to their own distributions.
This is why z scores are widely used in statistics, testing, quality control, social sciences, and data analysis. They remove unit differences and let you compare apples to apples. They are especially useful when two variables have:
- Different units, such as dollars versus kilograms
- Different means, such as average test scores in different subjects
- Different variability, such as tightly clustered heights versus highly variable income values
- Different contexts where raw values can be misleading
The formula for each variable
If you are given two variables, calculate each z score separately:
- For variable 1: z1 = (x1 – μ1) / σ1
- For variable 2: z2 = (x2 – μ2) / σ2
- Compare z1 and z2
You can interpret the results in a few useful ways:
- Signed comparison: A positive z score means above the mean, and a negative z score means below the mean.
- Magnitude comparison: The absolute value |z| tells you how far the observation is from the mean regardless of direction.
- Relative ranking: The larger z score is more above average relative to that variable’s spread.
Step by step example with two variables
Imagine you want to compare a runner’s sprint time and vertical jump. Lower sprint time is better in practice, but for z score interpretation we still focus on distance from the mean. Suppose:
- Sprint time x1 = 11.8 seconds, mean μ1 = 12.4, standard deviation σ1 = 0.5
- Vertical jump x2 = 62 cm, mean μ2 = 55, standard deviation σ2 = 6
Now compute the z scores:
- z1 = (11.8 – 12.4) / 0.5 = -1.2
- z2 = (62 – 55) / 6 = 1.17
The sprint z score is negative because 11.8 is below the average sprint time. Since lower time can indicate better performance, context matters. Statistically, it means the observation is 1.2 standard deviations below the mean. The vertical jump is about 1.17 standard deviations above the mean. In terms of absolute distance from the mean, both are very similar, but the sprint result is slightly farther from average.
Comparison table with real style statistics
| Scenario | Observed Value | Mean | Standard Deviation | Z Score | Interpretation |
|---|---|---|---|---|---|
| SAT Math | 650 | 530 | 120 | 1.00 | One standard deviation above average |
| Adult Female Height | 68 in | 63.7 in | 2.7 in | 1.59 | More unusual than the SAT example |
| Resting Heart Rate | 58 bpm | 72 bpm | 10 bpm | -1.40 | Below average by 1.4 standard deviations |
These examples show how z scores make values comparable even when the original measurements differ. A height z score of 1.59 means that height is more exceptional relative to typical variation than a test score with a z score of 1.00.
How to interpret positive and negative z scores
Many students think a negative z score is automatically bad. That is not true. A negative z score simply means the observation lies below the variable’s mean. Whether that is good or bad depends on the variable. For blood pressure, lower can be desirable within a healthy range. For response time, lower is often better. For income or exam points, lower may signal weaker performance. The z score itself is neutral. It tells you location relative to average, not quality.
- z = 0: exactly at the mean
- z = 1: one standard deviation above the mean
- z = -1: one standard deviation below the mean
- |z| greater than 2: often considered notably unusual
- |z| greater than 3: often considered very unusual or a possible outlier
Common mistakes when calculating z score given two variables
Several common errors appear when comparing two variables with z scores:
- Using the wrong mean and standard deviation. Each variable must use its own μ and σ. You should never plug both values into one shared formula unless both observations come from the exact same distribution.
- Comparing raw values instead of z scores. A raw score of 90 is not automatically more extreme than a raw score of 170. The scale matters.
- Ignoring the sign. If direction matters, keep the sign. If you only care about unusualness, compare absolute values.
- Using z scores on highly non normal data without caution. Z scores can still standardize values, but probability interpretation is strongest when the distribution is approximately normal.
- Dividing by zero or a negative standard deviation. Standard deviation must be greater than zero.
When should you compare z scores directly?
You can directly compare z scores when each variable has a meaningful mean and standard deviation calculated from an appropriate population or sample. This is common in educational testing, anthropometric measurements, finance, manufacturing, and psychology. If both z scores are based on valid distributions, the comparison is meaningful because each number answers the same question: how many standard deviations from average is this observation?
For example, if one applicant has a verbal test z score of 1.4 and a quantitative test z score of 0.8, the applicant stands out more strongly on the verbal measure. If an athlete has a speed z score of -1.6 and a strength z score of 0.9, the athlete is farther from average in speed than in strength, with the direction reflecting below average speed time or above average strength depending on the metric.
Second comparison table: reading z scores across different domains
| Domain | Variable A | Z(A) | Variable B | Z(B) | Which is farther from average? |
|---|---|---|---|---|---|
| Academics | Reading score | 0.75 | Science score | 1.30 | Science score |
| Health | Cholesterol | 2.10 | Body mass index | 0.95 | Cholesterol |
| Sports | 40 yard dash | -1.80 | Bench press reps | 1.10 | 40 yard dash by absolute value |
What if the two variables are measured on the same person?
This is very common. You might compare one person’s exam score and IQ score, or one person’s height and weight, or one patient’s blood pressure and cholesterol reading. The fact that the same individual produced both values does not change the z score procedure. You still standardize each variable using the proper mean and standard deviation from the relevant reference group. The main goal is to determine where that person stands on each metric relative to the population.
Sample z score versus population z score
In strict notation, the z score formula uses population mean μ and population standard deviation σ. In practice, analysts sometimes compute a standardized score using sample mean x̄ and sample standard deviation s when population values are unavailable. Many software tools still refer to the result as a z score, although technically the context matters. The interpretation remains similar: it shows relative position in standard deviation units.
If you are working in an academic or research setting, be clear about whether your mean and standard deviation come from a sample or a population. If you are working with published norms, such as standardized testing norms or public health reference values, you are often effectively using population style parameters.
Relationship between z scores and the normal distribution
Z scores are closely linked to the standard normal distribution. If a variable is approximately normal, then the z score can be used to estimate percentiles and probabilities. For example, a z score of 1.00 corresponds to roughly the 84th percentile, while a z score of -1.00 corresponds to roughly the 16th percentile. This means an observation one standard deviation above the mean is higher than about 84 percent of the population.
Useful approximate benchmarks include:
- z = 0.00 is the 50th percentile
- z = 1.00 is about the 84th percentile
- z = 1.96 is about the 97.5th percentile
- z = -1.96 is about the 2.5th percentile
Authoritative references for z scores and standardization
If you want deeper statistical background, these sources are reliable starting points:
- National Institute of Standards and Technology for measurement and statistical methods
- Centers for Disease Control and Prevention for growth charts, health distributions, and standardized reference values
- Penn State Eberly College of Science Statistics Online for academic explanations of standardization and normal distributions
Practical rules for deciding which variable is more extreme
- Compute z1 and z2 using the correct means and standard deviations.
- If you care about direction, compare the signed z scores directly.
- If you care about unusualness only, compare |z1| and |z2|.
- The larger absolute z score indicates the value farther from average relative to that variable’s spread.
- If one z score is positive and the other negative, one variable is above average while the other is below average.
Final takeaway
To calculate z score given two variables, compute one z score for each variable separately, using that variable’s observed value, mean, and standard deviation. Then compare the resulting standardized values. This method converts different measurements into a common language of standard deviation units. It is one of the simplest and most powerful tools in statistics because it lets you compare performance, rarity, and position across very different kinds of data.
Formula summary: z1 = (x1 – μ1) / σ1 and z2 = (x2 – μ2) / σ2. Compare the signs for direction and compare the absolute values for extremeness.