Skip to contents

This function calculates the \(n\)-th standardized moment of a ddf distribution.

Usage

standardized_moment(dist, n)

Arguments

dist

A ddf object, the distribution.

n

An integer, the order of the moment.

Value

A double.

Details

The \(n\)-th standardized moment of a random variable \(X\) is given by $$\mu_n/\sigma^n,$$ where \(\mu_n\) denotes the \(n\)-th moment about the mean (see also central_moment()) and \(\sigma^n\) is the \(n\)-th power of the standard deviation.

Note that we here normalize with \(\sigma^n\), although sometimes other normalizations are used.

See also

Other moments: central_moment(), moment()

Examples

# The second standardized moment is always 1
standardized_moment(unif(10), 2)
#> [1] 1

# The third standardized moment measures skewness
# (compare ?skew())
standardized_moment(bin(10, 0.8), 3)
#> [1] -0.4743416