The variance or covariance of a distribution, either calculated analytically if or estimated numerically.

variance(object)

object | Distribution. |
---|

Variance as a numeric.

The variance of a distribution is defined by the formula $$var_X = E[X^2] - E[X]^2$$ where \(E_X\) is the expectation of distribution X. If the distribution is multivariate the covariance matrix is returned.

If an analytic expression isn't available, returns error. To impute a numerical expression, use the
`CoreStatistics`

decorator.

$variance()

`CoreStatistics`

, `decorate`

and `genExp`

.