How do I specifically test the null and alternative hypothesis of the skewness and/or Kurtosis of a variable in hypothesis testing? Would I have to use a formula in t.test?

    t.test(data$variable, y = Null)

Any help is appreciated. Thanks!


1 Answer 1


You have many options. Two of the best ways to test skewness and kurtosis using the moments or e1071 package:

duration <- data$variable # I'm going to call it duration



I should mention that skewness and kurtosis are almost always present (only in an absolutely perfectly normal distribution would it not be) and they are interpreted as more of a gradient. Small values are approximately normal and larger values mean it's from some other distribution like Weibull, etc, etc.

So, you normally don't "test" for it in the sense of getting a p-value, so much as you "measure" it and interpret the coefficients to see which distribution it most closely represents. Having said that, if you wanted to you could test for it by using Galton's measures instead of Pearson's, then testing for siginficant difference from zero. But I don't think that would be really helpful as almost all empirical data would have some significant skewness and kurtosis, thus it's really just a matter of how much (i.e. is it enough to make the data look more like another distribution or is the data still closest to the normal distribution).

In case you want to use Galton's measures you can either find a prepacked implementation, I believe moments provides it, or do a custom function like this:

galtonskew.proc <- function(x){
  #  Compute Galton's skewness measure for x
  #  NOTE: this procedure assumes no x values are missing
  quarts <- as.numeric(quantile(x, probs = c(0.25, 0.5, 0.75)))
  num <- quarts[1] + quarts[3] - 2*quarts[2]
  denom <- quarts[3] - quarts[1]
  gskew <- num/denom
  • Hi Hack-R, thank you for the explanation. However, the problem I am trying to solve does in fact ask to test for it. For example: "Test H0 : m3 = 0 versus Ha : K9 != 0, where K9 is the kurtosis of the variable".
    – Starbucks
    Jun 26, 2016 at 23:12
  • 1
    @Starbucks OK so that's the situation I was describing in the 2nd sentence of the last paragraph. You can do that. You'll probably want to use Galton's measures. You should be able to use moments.
    – Hack-R
    Jun 26, 2016 at 23:20

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.