Description Usage Arguments Details Value References Examples
Compute Pearson's coefficient of skewness.
1 | PearsonSkew(x)
|
x |
a vector of original observations. |
Pearson's coefficient of skewness is defined as
γ_1 = \frac{E[(X - μ)^3]}{(σ^3)}
where μ = E(X) and σ^2 = E[(X - μ)^2]. The sample version based on a random sample x_1,x_2,…,x_n is defined as
\hat{γ_1} = \frac{∑_{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.
1 2 3 4 5 6 7 8 9 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.