PearsonSkew {KbMvtSkew} | R Documentation |
Compute Pearson's coefficient of skewness.
PearsonSkew(x)
x |
a vector of original observations. |
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.
PearsonSkew
gives the sample Pearson's univariate skewness.
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.
# 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)