Skip to main content
Module

x/statistics/mod.ts>zScore

Deno basic statistics module.
Latest
function zScore
import { zScore } from "https://deno.land/x/statistics@v0.1.1/mod.ts";

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: number
mean: number
standardDeviation: number