Get common moment-related quantities of a
distribution: mean, variance, standard deviation (stdev),
skewness, and kurtosis or excess kurtosis (kurtosis_exc).
If these quantities are not supplied in the
distribution's definition, a numerical algorithm may be used.
Usage
kurtosis(distribution)
kurtosis_exc(distribution)
# S3 method for class 'dst'
mean(x, ...)
skewness(distribution)
stdev(distribution)
variance(distribution)Arguments
- x, distribution
Distribution to evaluate.
- ...
When calculating the mean via integration of the quantile function, arguments passed to
stats::integrate().
Details
If a moment is not supplied in the distribution's definition, it is computed numerically over the distribution's support: a sum over the atoms (the discrete part) plus integration of the density over the continuous part. An infinite atomic support (such as a Poisson's) is summed by walking outward through its atoms until the tail contribution is negligible.
