PearsonSkew: Pearson's coefficient of skewness

Description Usage Arguments Details Value References Examples

View source: R/KbSkewness.R

Description

Compute Pearson's coefficient of skewness.

Usage

1

Arguments

x

a vector of original observations.

Details

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.

Value

PearsonSkew gives the sample Pearson's univariate skewness.

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

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)

KbMvtSkew documentation built on March 26, 2020, 7:44 p.m.