6
$\begingroup$

I am looking for a way to plot a skewness kurtosis plot of a range of distributions: Pearson systems, log normal, gamma , generalized gamma, Pareto 1,2,3,4 etc.

I've only found some of these distribution plots. Is it even possible to plot a skewness-kurtosis plot for all theoretical distributions? How to do it for those I need?

$\endgroup$
  • $\begingroup$ OP: Presumably you are aware of a Pearson plot diagram which characterises distributions (that are members of the Pearson family) in terms of skewness (y-axis) and kurtosis (x-axis). Is your question: how to add other distributions onto a Pearson diagram? $\endgroup$ – wolfies Jan 9 '16 at 16:08
  • $\begingroup$ @wolfies Yes Actually that is in some way my question. have a graph in the output showing the pearson diagram and other distributions and also my data sample skewness kurtosis dot (or dots if there are more samples) $\endgroup$ – Saad Touhbi Jan 9 '16 at 21:36
  • $\begingroup$ There's an infinite number of theoretical distributions. You'll have to narrow the list a bit! I'd be very surprised if you actually care about more than a few. $\endgroup$ – Glen_b Jan 10 '16 at 5:25
  • $\begingroup$ stats.stackexchange.com/questions/243973/… and serach this site for Cullen and Frey plot $\endgroup$ – kjetil b halvorsen Feb 17 '18 at 15:18
6
$\begingroup$

Pearson plot

Let:

$$\beta _1=\frac{\mu _3^2}{\mu _2^3} \quad \text{and} \quad \beta _2=\frac{\mu _4}{\mu _2^2}$$

where $\sqrt{\beta_1}$ is often used as a measure of skewness, and $\beta_2$ is often used as a measure of kurtosis.

The Pearson plot diagram characterises distributions that are members of the Pearson family in terms of skewness ($x$-axis) and kurtosis ($y$-axis):

enter image description here

  • The point at (0,3) denotes the Normal distribution.

  • A Gamma distribution defines the green Type III line. The Exponential distribution is just a point on the Type III line.

  • An Inverse Gamma distribution defines the blue Type V line.

  • A Power Function [Beta(a,1)] defines the Type I(J) line. Type I nests the Beta distribution.

  • Type VII (symmetrical: when $\beta_1 = 0$) nests Student's t distribution etc

Adding other distributions to the Pearson diagram

The OP asks how to add other distributions (that may not even be members of the Pearson family) onto the Pearson plot diagram. This is something done as an exercise in Chapter 5 of our Springer text: Rose and Smith, Mathematical Statistics with Mathematica. A free copy of the chapter can be downloaded here:

http://www.mathstatica.com/book/bookcontents.html

To illustrate, suppose we want to add a skew-Normal distribution onto the Pearson plot diagram. Let $X \sim \text{skewNormal}(\lambda)$ with pdf $f(x)$:

enter image description here

The mean is:

enter image description here

... while the second, third and fourth central moments are:

enter image description here

Then, $\beta_1$ and $\beta_2$ are given by:

enter image description here

Since $\beta_1$ and $\beta_2$ are both determined by parameter $\lambda$, it follows that $\beta_1$ and $\beta_2$ are related. Eliminating parameter $\lambda$ looks tricky, so we shall use numerical methods instead. For instance, we can plot $\beta_1$ and $\beta_2$ parametrically, as a function of $\lambda$, as $\lambda$ increases from 0 to say 300:

enter image description here

Where will this line be located on a Pearson diagram? To see the answer exactly, we need to superimpose plot P1 onto a standard Pearson diagram. Since a Pearson plot has its vertical axis inverted, we still need to invert the vertical axis of plot P1. This can be done by converting all points {x,y} in P1 into {x,9-y}, and then showing P1 and the Pearson plot together. Doing so yields:

enter image description here

In summary, the black line in the diagram depicts the possible values of ($\beta_1, \beta_2$) that a $\text{skew-Normal}(\lambda)$ distribution can exhibit. We start out at (0,3) i.e. the Normal distribution when $\lambda=0$, and then move along the black line as $\lambda$ increases towards infinity.

The same method can conceptually be adopted for any distribution: in some cases, the distribution will be captured by a single point; in others, such as the case here, as a line; and in others, something more general.

Notes

  1. Expect and PearsonPlot are functions from the mathStatica add-on to Mathematica; Erf denotes the error function, and ParametricPlot is a Mathematica function.

  2. In the limit, as $\lambda$ increases towards infinity, at the upper extremum, $\beta_1$ and $\beta_2$ take the following values, here expressed numerically: {0.990566, 3.86918}

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for the explanation. Now I can generate skewness-kurtosis plots of each distribution. It will be a bit harder since I don't use mathematica, But I can manage. $\endgroup$ – Saad Touhbi Jan 10 '16 at 11:46
5
$\begingroup$

There are two main types of skewness-kurtosis plot; one where the skewness is plotted against kurtosis (where the boundary of impossibility is a parabola) and one where squared skewness is plotted against kurtosis (where it becomes a line).

Some plots don't just plot the sample value for a single sample -- some use the bootstrap to produce a spread of values that's supposed to reflect sampling variability (so you can see which distributions are plausible and which ones are "too far away"). [However, by trying some example population distributions, it seems often to underestimate the variability in one direction and slightly overestimate it in another (the resampled values often tended to cluster about a line more than they should if they really indicated the sampling variability).]

But in any case the way to plot a distribution is to look up its skewness and kurtosis and plot them.

  1. If the skewness and kurtosis are fixed, just plot that point (and label it). However, note that some distributions may not have both skewness and kurtosis being finite (if kurtosis is finite then skewness must be too, and if skewness is not finite then kurtosis won't be either).

  2. If the distribution is a family whose skewness and kurtosis depends on a parameter, if you can't write the relationship between skewness and kurtosis directly you can use that parameter to parameterize the curve it lays on.

  3. If skewness and/or kurtosis depends on a couple of parameters between them (or perhaps more that two), you probably have a region rather than a curve, in which case you'll need to try to figure out the boundaries from the relationship between the possible values of the parameters and the skewness/kurtosis.

Here's a basic diagram (based on one I did for some notes I wrote last year on the Pearson family):

![enter image description here

Note that I have $\beta_2$ (kurtosis) on the x-axis and $\beta_1$ (squared skewness) on the y-axis. This is because the plots work better in this orientation as you need more space for kurtosis.

The Pearson distribution types are marked with Roman numerals in parentheses. Note that the named distributions (like the "gamma" on the "(III)" line) encompass scaled and shifted versions of those families (including negative scales).

[My diagram doesn't split up the beta (type $\text{I}$) region into "U"-shaped/"J"-shaped/hill-shaped subregions but some diagrams do so]

Here's some examples of adding some distributions which are not Pearson family:

  • case 1 (single distribution before location/scale transform): Logistic distribution

    Wikipedia gives skewness as 0 and Excess kurtosis as 1.2, so $\beta_1=$ 0 and $\beta_2=$ 4.2. So we want to plot a point (marked with say "L") at (4.2,0)

  • case 2 (1-parameter family before location-scale): Lognormal distribution

    Wikipedia gives skewness as $(e^{\sigma^2}\!\!+2) \sqrt{e^{\sigma^2}\!\!-1}$
    and excess kurtosis as $e^{4\sigma^2}\!\! + 2e^{3\sigma^2}\!\! + 3e^{2\sigma^2}\!\! - 6$

    Writing $a$ for $e^{\sigma^2}$, this means that
    $\beta_1=(a+2)^2(a-1)$
    $\beta_2=a^4\!\! + 2a^3\!\! + 3a^2\!\! - 3$

    The direct relationship between these two is not immediately obvious so let's use $a$ to parameterize it. As $a\to 1$, note that this approaches the normal. At $a=1.724$ we reach the right edge of our diagram so we should have $a$ vary between those values. If we choose enough values (10 is probably enough since it isn't strongly curved) we get a smooth looking curve.

    ![enter image description here

    The logistic point is at the bottom to the right of the normal point.
    The lognormal curve is shown with dashed black lines, in the type $\text{VI}$ region (but it's not type VI).


In R a plot like this can most readily be generated using the descdist function in the fitdistrplus package:

enter image description here

Here the blue point is a particular sample (as it happens, from an ExGaussian). Note that this display has the axes flipped around from my earlier diagram. (It's harder to add additional distribution points and lines to this, but it is still possible if you look at what the code in descdist does, specifically with how it uses the kurtmax variable.)


Since people are sure to ask for it, here's R code for the first plot:

plot(c(0,25),c(0,14),type="n", frame=FALSE,
    ylab=expression(beta[1]),
    xlab=expression(beta[2]) )

#region 0
polygon(c(0,0,1,15),c(14,0,0,14),col=rgb(.8,0.8,.85,.5),border=FALSE)
lines(c(1,15),c(0,14),lwd=2,col="grey")

# region I
polygon(c(15,1,3,3+21),c(14,0,0,14),col=rgb(.99,0.5,.8,.5),border=FALSE)
lines(c(3,3+21),c(0,14),lwd=2,col=rgb(.99,0.5,.8,1))

# region VI
 a=rev(exp(seq(log(5.759),log(1000),.2)))
polygon(c(25,3+21,3,3*(a+5)*(a-2)/(a-3)/(a-4)),
        c(14,14,0,16*(a-2)/(a-3)^2),
         col=rgb(.95,0.8,.3,.4),border=FALSE)
lines(c(3,3*(a+5)*(a-2)/(a-3)/(a-4)),
      c(0,16*(a-2)/(a-3)^2),lwd=2,col=rgb(0.95,.8,.3,.9))

# region IV
a=rev(a)
polygon(c(3*(a+5)*(a-2)/(a-3)/(a-4),3,25),
        c(16*(a-2)/(a-3)^2,0,0),
         col=rgb(.5,0.95,.6,.4),border=FALSE)

points(1.8,0,pch="U")
points(3,0,pch="N")
points(9,4,pch="E")
text(0.5,13,labels="U - uniform",pos=4)
text(0.5,12,labels="N - normal",pos=4)
text(0.5,11,labels="E - exponential",pos=4)

text(1,8,labels="impossible",pos=4)
text(9,7,labels="beta",pos=4)
text(16,7.75,labels="beta prime, F",pos=4)

text(9.2,6.25,labels="(I)",pos=4,family="serif")
text(1.8,0,labels="(II)",pos=4,cex=0.8,family="serif")
text(16.2,7,labels="(VI)",pos=4,family="serif")
text(15,2,labels="(IV)",pos=4,family="serif")
text(13,7.1,labels="(III)",pos=4,cex=0.8,family="serif")
text(17,5.7,labels="(V)",pos=4,cex=0.8,family="serif")
text(12.5,0,labels="(VII)",pos=4,cex=0.8,family="serif")

text(12.2,0,labels="t",pos=4)
text(11.25,5.8,labels="gamma",srt=25,pos=4)
text(15.3,5,labels="inverse",srt=14,pos=2)
text(14.9,5.15,labels="gamma",srt=11,pos=4)

(It is necessary to stretch the plot area to be roughly the shape I made it above or the slanted text won't be in the right place.)

The code to place the point for the logistic and the curve for the lognormal is then:

 points(4.2,0,pch="L")

 a=c((10:17)/10,1.724)
 lines(a^4 + 2*a^3 + 3*a^2 - 3,(a+2)^2*(a-1),lty=2)
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.