Closed mwaskom closed 6 years ago
Hi @mwaskom , I just checked the book and we seem to implement it exactly as stated in there (skewness with centered, kurtosis with uncentered). I also checked Mardia and Jupp 2000, but their notation is even harder to understand. However, skewness should not depend on the location of the distribution. Therefore, I think you found a typo in the book by Fisher and the skewness really should use the uncentered moment.
Would you mind putting that in a pull request? If it's too much hassle for you I can do it as well. Let me know.
Love seaborn by the way. Thanks for writing it!
I find that the computation of Fisher skewness can produce surprising results. Large samples from a normal distribution with a nonzero mean are determined to have very large skew. For example,
gives a value of about -36.73.
I have a suspicion about what is happening. In the code, the mean is subtracted away from the centered second moment. But I think that should be the uncentered second moment. If I re-define the function to
Then
fixed_skewness(alpha)
gives a value of about 0.000875, which better matches my (linear) intuitions.Additionally, on p.34 of Fisher, the centered skewness is defined in terms of \hat \mu_2, which I think is the notation for the uncentered moment, and not m_2, the centered second moment. Though I find the appearance and disappearance of primes in Fisher's notation confusing.
Does this make sense?
~Also if this is actually a bug, then the Fisher kurtosis is probably wrong too.~
Edit: actually, the Fisher Kurtosis uses the uncentered second moment.