Skip to main content
Module

x/statistics/mod.ts>mean

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

The mean, also known as average, is the sum of all values over the number of values. This is a measure of central tendency: a method of finding a typical or central value of a set of numbers.

This runs on O(n), linear time in respect to the array

Examples

mean([0, 10]); // => 5

Parameters

x: number[]

sample of one or more data points

Returns

number

mean