Skip to main content
Module

x/simplestatistics/index.js>zScore

simple statistics for node & browser javascript
Go to Latest
function zScore
import { zScore } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

The Z-Score, or Standard Score.

The standard score is the number of standard deviations an observation or datum is above or below the mean. Thus, a positive standard score represents a datum above the mean, while a negative standard score represents a datum below the mean. It is a dimensionless quantity obtained by subtracting the population mean from an individual raw score and then dividing the difference by the population standard deviation.

The z-score is only defined if one knows the population parameters; if one only has a sample set, then the analogous computation with sample mean and sample standard deviation yields the Student's t-statistic.

Examples

zScore(78, 80, 5); // => -0.4

Parameters

x
mean
standardDeviation