Z-Score Reference Cohort Comparison
Paste two datasets measured in the same units, enter a shared probe and choose a sample or population convention. Compare exact z-scores and follow the effect of changing the mean first and then the standard deviation.
Compare the same z-score probe across two reference cohorts
See whether the reference mean or its spread moves the value across your threshold.
Reference values and probe
Enter two to 20 values per cohort, separated by commas or spaces. Use the same measurement units in both lists and the probe.
Only cohort A puts the probe at or beyond the threshold.
Probe against each reference
Cohort A
2.44949
At or beyond threshold
Mean 10 · variance 8/3 · 3 values
Cohort B
1.224745
Within threshold
Mean 13 · variance 2/3 · 3 values
Change the mean, then the spread
The middle row uses B’s mean and keeps A’s standard deviation. The last row uses both from B.
Dashed lines mark ±2. The plot shows scores through ±4.
An arrow means the score extends beyond the plot. Zero spread leaves a lane without a marker.
| Reference | Exact z | Threshold |
|---|---|---|
| Cohort A | √(6) | At or beyond threshold |
| B mean, A spread | √(3/8) | Within threshold |
| Cohort B | √(3/2) | Within threshold |
Export the reference comparison
Save your cohort values, exact means and variances, and the threshold result at every step.
View CSV text
How to use this calculator
- Paste the two reference datasets, using comma-separated or whitespace-separated observations.
- Enter the same measurement as a probe for both references. Choose population or sample variance and enter a positive absolute z-score threshold.
- Compare the two scores, then inspect the middle stage that changes only the mean. Swap the references to see the other order.
- Use the exact score table and download the CSV for the reference values and thresholds.
The Formula
The mathematical logic powering this calculation is:
For each reference, mean is the sum divided by count. Population variance divides the centered sum of squares by n. Sample variance divides it by n−1. Use one convention for both datasets. The standard deviation is the positive square root of the variance.
For a common value x, the score is (x−mean)/SD. Starting at A gives z_A=(x−mean_A)/SD_A. The mean-only step replaces mean_A with mean_B while keeping SD_A. The last step also replaces SD_A with SD_B. The intermediate result depends on the chosen order. Swapping the references reverses the endpoints and uses the new starting spread in the middle step.
For a threshold k > 0, the worksheet compares (x−mean)² with k² × variance, or equivalently compares z² with k². Equality counts at the threshold. Zero variance leaves the score undefined, even when the value equals the mean. The threshold is a descriptive comparison.
Enter two to 20 observations in each cohort. Values and the probe accept signed decimals through ±1 trillion with up to 12 fractional places. The threshold must be positive and at most 50. The model retains exact fractions for means, variances and squared scores. The display rounds approximate scores and draws the markers through ±2k. An arrow indicates a score beyond that view and the ledger retains the exact value.Worked Example
If you input:
- Reference A: 8, 10, 12
- Reference B: 12, 13, 14
- Probe: 14
- Threshold: 2, population variance
Result:
Cohort A gives z = √6, about 2.44949. Replacing A’s mean with B’s lowers the score to √(3/8), about 0.6123724. Replacing the spread gives Cohort B’s exact score √(3/2), about 1.224745. Only Cohort A reaches the threshold.
Frequently Asked Questions
Why can the same value have two z-scores?
Each reference has its own mean and spread. The same observed value can sit near one mean and far from another. A tighter spread also increases the magnitude of a nonzero deviation.
What does the middle row mean?
It uses B’s mean but keeps A’s standard deviation. The change from A to that row isolates the mean replacement in this order. The last step changes the standard deviation as well.
What happens when every observation in a cohort is equal?
Its variance is zero. A z-score that uses that spread is undefined, while any stage with positive spread can still be calculated.
Does passing a threshold establish an outlier?
The threshold reports distance in reference standard deviations. It depends on the reference data and is a descriptive comparison. A probability or formal outlier conclusion requires additional assumptions and an appropriate method.
Similar Calculators
Z-Score Quick Calculator
Calculate a z-score from an observed value, mean, and standard deviation.
Standard Deviation Calculator
Calculate sample or population standard deviation, variance, mean and extrema from complete decimal data. Preserve small differences and identify invalid entries.
Excel Variance Calculator & Range Audit
Audit which Excel-style cells enter VAR.S and VAR.P. Compare exact range variances, squared-deviation contributions and what happens when a row is removed.
