Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simplestatistics/src/sample_skewness.js>default

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

Skewness is a measure of the extent to which a probability distribution of a real-valued random variable "leans" to one side of the mean. The skewness value can be positive or negative, or even undefined.

Implementation is based on the adjusted Fisher-Pearson standardized moment coefficient, which is the version found in Excel and several statistical packages including Minitab, SAS and SPSS.

Examples

sampleSkewness([2, 4, 6, 3, 1]); // => 0.590128656384365

Parameters

x

a sample of 3 or more data points