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

variance(object)

## Arguments

object Distribution.

## Value

Variance as a numeric.

## Details

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.

## R6 Usage

\$variance()

CoreStatistics, decorate and genExp.