variance: Computes the approximate variance of a loss distribution.
Description
The computation is based on Steiner's theorem \(\textrm{var}(X) = \textrm{E}(X^2) - (\textrm{E}(X))^2\), where the
respective first and second moments are computed using the moment function (from this package). Internally, these
functions operate on the approximate kernel density estimation for both, continuous and categorical distributions
(see the lossDistribution function for details).