Learn R Programming

KbMvtSkew (version 1.0.2)

PearsonSkew: Pearson's coefficient of skewness

Description

Compute Pearson's coefficient of skewness.

Usage

PearsonSkew(x)

Arguments

x

a vector of original observations.

Value

PearsonSkew gives the sample Pearson's univariate skewness.

Details

Pearson's coefficient of skewness is defined as $$\gamma_1 = \frac{E[(X - \mu)^3]}{(\sigma^3)}$$ where \(\mu = E(X)\) and \(\sigma^2 = E[(X - \mu)^2]\). The sample version based on a random sample \(x_1,x_2,\ldots,x_n\) is defined as $$\hat{\gamma_1} = \frac{\sum_{i=1}^n (x_i - \bar{x})^3}{n s^3}$$ where \(\bar{x}\) is the sample mean and \(s\) is the sample standard deviation of the data, respectively.

References

Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philos. Trans. R. Soc. Lond. A 185, 71-110.

Pearson, K. (1895). Contributions to the mathematical theory of evolution II: skew variation in homogeneous material. Philos. Trans. R. Soc. Lond. A 86, 343-414.

Examples

Run this code
# NOT RUN {
# Compute Pearson's univariate skewness

set.seed(2019)
x <- rnorm(1000) # Normal Distribution
PearsonSkew(x)

set.seed(2019)
y <- rlnorm(1000, meanlog = 1, sdlog = 0.25) # Log-normal Distribution
PearsonSkew(y)

# }

Run the code above in your browser using DataLab