stddev.php
Table of Contents
Functions
- stddev() : float
- Computes the standard deviation of a list of numbers.
Functions
stddev()
Computes the standard deviation of a list of numbers.
stddev(array<int, int|float> $values[, bool $sample = false ]) : float
The standard deviation is the square root of the variance(). By default the
population standard deviation is returned ; when $sample is true, the sample
standard deviation is returned (Bessel's correction, N - 1).
Parameters
- $values : array<int, int|float>
-
A list of numeric values (at least one for population, two for sample).
- $sample : bool = false
-
Whether to compute the sample standard deviation (
N - 1) instead of the population one (N).
Tags
Return values
float —The standard deviation of the values.