mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
938 B
938 B
Function var
Compute the variance of a list of values In case of a (multi dimensional) array or matrix, the variance over all elements will be calculated.
var(a, b, c, ...) var(A) var(A, normalization)
Where normalization is a string having one of the following values:
Parameters
| Parameter | Type | Description |
|---|---|---|
array |
Array | Matrix | A single matrix or or multiple scalar values |
normalization |
String | Default value: 'unbiased' Determines how to normalize the variance: - 'unbiased' (default) The sum of squared errors is divided by (n - 1) - 'uncorrected' The sum of squared errors is divided by n - 'biased' The sum of squared errors is divided by (n + 1) |
Returns
| Type | Description |
|---|
- | res