mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
27 lines
938 B
Markdown
27 lines
938 B
Markdown
# 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
|
|
|
|
|
|
|
|
|
|
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|