In statistics and probability theory, the nonparametric skew is a statistic occasionally used with random variables that take real values.[1] [2] It is a measure of the skewness of a random variable's distribution - that is, the distribution's tendency to "lean" to one side or the other of the mean. Its calculation does not require any knowledge of the form of the underlying distribution - hence the name nonparametric. It has some desirable properties: it is zero for any symmetric distribution; it is unaffected by a scale shift; and it reveals either left- or right-skewness equally well. In some statistical samples it has been shown to be less powerful[3] than the usual measures of skewness in detecting departures of the population from normality.[4]
The nonparametric skew is defined as
S=
\mu-\nu | |
\sigma |
where the mean (μ), median (ν) and standard deviation (σ) of the population have their usual meanings.
The nonparametric skew is one third of the Pearson 2 skewness coefficient and lies between -1 and +1 for any distribution.[5] [6] This range is implied by the fact that the mean lies within one standard deviation of any median.[7]
Under an affine transformation of the variable (X), the value of S does not change except for a possible change in sign. In symbols
S(aX+b)=\operatorname{sign}(a)S(X)
where a ≠ 0 and b are constants and S(X) is the nonparametric skew of the variable X.
The bounds of this statistic (±1) were sharpened by Majindar[8] who showed that its absolute value is bounded by
2(pq) | |
(p+q) |
with
p=\Pr(X>\operatorname{E}(X))
and
q=\Pr(X<\operatorname{E}(X)),
where X is a random variable with finite variance, E is the expectation operator and Pr is the probability of the event occurring.
When p = q = 0.5 the absolute value of this statistic is bounded by 1. With p = 0.1 and p = 0.01, the statistic's absolute value is bounded by 0.6 and 0.199 respectively.
It is also known that[9]
|\mu-\nu0|\le\operatorname{E}(|X-\nu0|)\le\operatorname{E}(|X-\mu|)\le\sigma,
where ν0 is any median and E(.) is the expectation operator.
It has been shown that
|\mu-xq| | |
\sigma |
\lemax\left(\sqrt{
(1-q) | |
q |
This latter inequality has been sharpened further.[11]
\mu-\sigma\sqrt{
1-q | |
q |
}\lexq\le\mu+\sigma\sqrt{
q | |
1-q |
}
\mu-
1 | |
2q |
\operatorname{E}|X-\mu|\lexq\le\mu+
1 | |
(2-2q) |
\operatorname{E}|X-\mu|
The bounds in this last pair of inequalities are attained when
\Pr(X=a)=q
\Pr(X=b)=1-q
For a finite sample with sample size n ≥ 2 with xr is the rth order statistic, m the sample mean and s the sample standard deviation corrected for degrees of freedom,[13]
|m-xr| | |
s |
\lemax\left[\sqrt{
(n-1)(r-1) | |
n(n-r+1) |
},\sqrt{
(n-1)(n-r) | |
nr |
}\right]
Replacing r with n / 2 gives the result appropriate for the sample median:[14]
|m-a| | |
s |
\le\sqrt{
n2-n | |
n2 |
}=\sqrt{
n-1 | |
n |
}
where a is the sample median.
Hotelling and Solomons considered the distribution of the test statistic[5]
D=
n(m-a) | |
s |
where n is the sample size, m is the sample mean, a is the sample median and s is the sample's standard deviation.
Statistical tests of D have assumed that the null hypothesis being tested is that the distribution is symmetric .
Gastwirth estimated the asymptotic variance of n−1/2D.[15] If the distribution is unimodal and symmetric about 0, the asymptotic variance lies between 1/4 and 1. Assuming a conservative estimate (putting the variance equal to 1) can lead to a true level of significance well below the nominal level.
Assuming that the underlying distribution is symmetric Cabilio and Masaro have shown that the distribution of S is asymptotically normal.[16] The asymptotic variance depends on the underlying distribution: for the normal distribution, the asymptotic variance of S is 0.5708...
Assuming that the underlying distribution is symmetric, by considering the distribution of values above and below the median Zheng and Gastwirth have argued that[17]
\sqrt{2n}\left(
m-a | |
s |
\right)
where n is the sample size, is distributed as a t distribution.
Antonietta Mira studied the distribution of the difference between the mean and the median.[18]
\gamma1=2(m-a),
where m is the sample mean and a is the median. If the underlying distribution is symmetrical γ1 itself is asymptotically normal. This statistic had been earlier suggested by Bonferroni.[19]
Assuming a symmetric underlying distribution, a modification of S was studied by Miao, Gel and Gastwirth who modified the standard deviation to create their statistic.[20]
J=
1 | |
n |
\sqrt{
\pi | |
2 |
}\sum{|Xi-a|}
where Xi are the sample values, || is the absolute value and the sum is taken over all n sample values.
The test statistic was
T=
m-a | |
J |
.
The scaled statistic T is asymptotically normal with a mean of zero for a symmetric distribution. Its asymptotic variance depends on the underlying distribution: the limiting values are, for the normal distribution = 0.5708... and, for the t distribution with three degrees of freedom, = 0.9689...[20]
For symmetric probability distributions the value of the nonparametric skew is 0.
It is positive for right skewed distributions and negative for left skewed distributions. Absolute values ≥ 0.2 indicate marked skewness.
It may be difficult to determine S for some distributions. This is usually because a closed form for the median is not known: examples of such distributions include the gamma distribution, inverse-chi-squared distribution, the inverse-gamma distribution and the scaled inverse chi-squared distribution.
The following values for S are known:
1 < α < β where α and β are the parameters of the distribution, then to a good approximation[21]
S=
1 | |
3 |
(\alpha-2\beta)(\alpha+\beta+1) | |
(\alpha+\beta-2/3)(\alpha\beta) |
If 1 < β < α then the positions of α and β are reversed in the formula. S is always < 0.
varies. If the mean is an integer then S = 0. If the mean is not an integer S may have either sign or be zero.[22] It is bounded by ±min / σ where σ is the standard deviation of the binomial distribution.[23]
S=
2 | |
\beta2(4+5\alpha2) |
where α is the shape parameter and β is the location parameter.
-4 | |
3 |
\leS\le
4 | |
3 |
Although S ≥ 0 its value depends on the numbers of degrees of freedom (k).
S ≈
| ||||||
2 |
S=1-loge(2) ≈ 0.31
S=1-loge(2) ≈ 0.31
S=-
polylog(2,1-p)+ln(1+\sqrt{p | |
) |
lnp}{\sqrt{-[2polylog(3,1-p)+polylog2(2,1-p)]}}
Here S is always > 0.
0\leS\le1-loge(2)
S=n\sqrt{
n-4 | |
n-2 |
}+O(n)
The variance of this distribution is defined only for α > 2.
S=
| |||||||||
} \sqrt |
{\Gamma\left(1-
2 | |
\alpha |
\right)-\left(\Gamma\left(1-
1 | |
\alpha |
\right)\right)2}
The median can only be determined approximately for this distribution.[26] If the shape parameter α is ≥ 1 then
S ≈
\beta | |
3\alpha+0.2 |
where β > 0 is the rate parameter. Here S is always > 0.
S=-
| ||||||
|
}
S is always < 0.
S is defined only when the shape parameter (k) is < 1/2. S is < 0 for this distribution.
S=\left(
2k-1 | |
k |
-2k\right)(1-2k)
\sqrt{6 | |
[ |
\gamma+loge(loge(2))]}{\pi} ≈ 0.1643
where γ is Euler's constant.[27]
S ≈
\sqrt{2 | |
- |
0.6745\sqrt{\pi}}{\sqrt{\pi-2}} ≈ 0.36279
S=
b-\sin(b) | |
\sqrt{b\tan(b)-b2 |
}
The standard deviation does not exist for values of b > 4.932 (approximately). For values for which the standard deviation is defined, S is > 0.
With mean (μ) and variance (σ2)
S=
1 | |||||||||||||||
|
S ≈
[loge(loge(2))-0.5772]\sqrt{6 | |
}{ |
\pi} ≈ -0.1643
S is defined only for α > 2
S=
(\alpha-1)(\alpha-2)(1-(\alpha-1)(2-1)) | |
\alpha |
S ≈
\sqrt{2 | |
- |
1.5382\Gamma(
3 | |
2 |
)}{\sqrt{2(\Gamma(
5 | |
2 |
)-\Gamma(
3 | |
2 |
))}} ≈ 0.0854
S=-1
for α > 2 where α is the shape parameter of the distribution,
S=(\alpha-2[\alpha-1])(
\alpha-2 | |
\alpha |
),
and S is always > 0.
-loge(2) | |||||||||
|
\leS\le
1 | |||||||||
|
where λ is the parameter of the distribution.[28]
S=\sqrt{
2 | |
4-\pi |
}[(
\pi | |
2 |
)-loge(4)] ≈ 0.1251
S=
\Gamma(1+1/k)-loge(2) | |
(\Gamma(1+2/k)-\Gamma(1+1/k)) |
,
where k is the shape parameter of the distribution. Here S is always > 0.
In 1895 Pearson first suggested measuring skewness by standardizing the difference between the mean and the mode,[29] giving
\mu-\theta | |
\sigma |
,
where μ, θ and σ is the mean, mode and standard deviation of the distribution respectively. Estimates of the population mode from the sample data may be difficult but the difference between the mean and the mode for many distributions is approximately three times the difference between the mean and the median[30] which suggested to Pearson a second skewness coefficient:
3(\mu-\nu) | |
\sigma |
,
where ν is the median of the distribution. Bowley dropped the factor 3 from this formula in 1901 leading to the nonparametric skew statistic.
The relationship between the median, the mean and the mode was first noted by Pearson when he was investigating his type III distributions.
For an arbitrary distribution the mode, median and mean may appear in any order.[31] [32] [33]
Analyses have been made of some of the relationships between the mean, median, mode and standard deviation.[34] and these relationships place some restrictions on the sign and magnitude of the nonparametric skew.
A simple example illustrating these relationships is the binomial distribution with n = 10 and p = 0.09.[35] This distribution when plotted has a long right tail. The mean (0.9) is to the left of the median (1) but the skew (0.906) as defined by the third standardized moment is positive. In contrast the nonparametric skew is -0.110.
The rule that for some distributions the difference between the mean and the mode is three times that between the mean and the median is due to Pearson who discovered it while investigating his Type 3 distributions. It is often applied to slightly asymmetric distributions that resemble a normal distribution but it is not always true.
In 1895 Pearson noted that for what is now known as the gamma distribution that the relation[29]
\nu-\theta=2(\mu-\nu)
where θ, ν and μ are the mode, median and mean of the distribution respectively was approximately true for distributions with a large shape parameter.
Doodson in 1917 proved that the median lies between the mode and the mean for moderately skewed distributions with finite fourth moments.[36] This relationship holds for all the Pearson distributions and all of these distributions have a positive nonparametric skew.
Doodson also noted that for this family of distributions to a good approximation,
\theta=3\nu-2\mu,
where θ, ν and μ are the mode, median and mean of the distribution respectively. Doodson's approximation was further investigated and confirmed by Haldane.[37] Haldane noted that samples with identical and independent variates with a third cumulant had sample means that obeyed Pearson's relationship for large sample sizes. Haldane required a number of conditions for this relationship to hold including the existence of an Edgeworth expansion and the uniqueness of both the median and the mode. Under these conditions he found that mode and the median converged to 1/2 and 1/6 of the third moment respectively. This result was confirmed by Hall under weaker conditions using characteristic functions.[38]
Doodson's relationship was studied by Kendall and Stuart in the log-normal distribution for which they found an exact relationship close to it.[39]
Hall also showed that for a distribution with regularly varying tails and exponent α that[38]
\mu-\theta=\alpha(\mu-\nu)
Gauss showed in 1823 that for a unimodal distribution[40]
\sigma\le\omega\le2\sigma
and
|\nu-\mu|\le\sqrt{
3 | |
4 |
}\omega,
where ω is the root mean square deviation from the mode.
For a large class of unimodal distributions that are positively skewed the mode, median and mean fall in that order.[41] Conversely for a large class of unimodal distributions that are negatively skewed the mean is less than the median which in turn is less than the mode. In symbols for these positively skewed unimodal distributions
\theta\le\nu\le\mu
and for these negatively skewed unimodal distributions
\mu\le\nu\le\theta
This class includes the important F, beta and gamma distributions.
This rule does not hold for the unimodal Weibull distribution.[42]
For a unimodal distribution the following bounds are known and are sharp:[43]
|\theta-\mu| | |
\sigma |
\le\sqrt{3},
|\nu-\mu| | |
\sigma |
\le\sqrt{0.6},
|\theta-\nu| | |
\sigma |
\le\sqrt{3},
where μ,ν and θ are the mean, median and mode respectively.
The middle bound limits the nonparametric skew of a unimodal distribution to approximately ±0.775.
The following inequality,
\theta\le\nu\le\mu,
where θ, ν and μ is the mode, median and mean of the distribution respectively, holds if
F(\nu-x)+F(\nu+x)\ge1forallx,
where F is the cumulative distribution function of the distribution.[44] These conditions have since been generalised[33] and extended to discrete distributions.[45] Any distribution for which this holds has either a zero or a positive nonparametric skew.
In 1964 van Zwet proposed a series of axioms for ordering measures of skewness.[46] The nonparametric skew does not satisfy these axioms.
Benford's law is an empirical law concerning the distribution of digits in a list of numbers. It has been suggested that random variates from distributions with a positive nonparametric skew will obey this law.[47]
This statistic is very similar to Bowley's coefficient of skewness[48]
SK2=
Q3+Q1-2Q2 | |
Q3-Q1 |
where Qi is the ith quartile of the distribution.
Hinkley generalised this[49]
SK=
F-1(1-\alpha)+F-1(\alpha)-2Q2 | |
Q3-Q1 |
where
\alpha
\alpha
Groeneveld and Meeden[50] removed the dependence on
\alpha
SK3=
\mu-Q2 | |
E|y-Q2| |
The denominator is a measure of dispersion. Replacing the denominator with the standard deviation we obtain the nonparametric skew.