Learn R Programming

npde (version 3.5)

skewness: Skewness

Description

Computes the skewness.

Usage

skewness(x)

Value

The skewness of x.

Arguments

x

a numeric vector containing the values whose skewness is to be computed. NA values are removed in the computation.

Details

If \(N = \mathrm{length}(x)\), then the skewness of \(x\) is defined as $$N^{-1} \mathrm{sd}(x)^{-3} \sum_i (x_i - \mathrm{mean}(x))^3.$$

References

G. Snedecor, W. Cochran. Statistical Methods, Wiley-Blackwell, 1989

Examples

Run this code
x <- rnorm(100)
skewness(x)

Run the code above in your browser using DataLab