Syntax

TypeScript
import { stddev } from '@opentf/std';

stddev<T>(arr: T[], cb?: (val: T, index: number) => number): number;

Returns

The population standard deviation.

Sparse array holes are ignored.

Examples

TypeScript
stddev([2, 4, 4, 4, 5, 5, 7, 9]) //=> 2
Last updated on
Edit this page