UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SPSS FAQ
Why do I get different values of kurtosis in SAS, Stata and SPSS?

If you read a number of statistics books, it is interesting to see that the formula for the kurtosis is not always the same.  One formula, from Snedecor and Cochran is

m2 = (Sum(x-xbar) ^ 2 / N)
m4 = (Sum(x-xbar) ^ 4 / N)

Kurtosis = (m4 / m2 ^2) - 3

For a normal distribution, this kurtosis value would be 0.

However, Bock defines kurtosis as

Kurtosis = (m4 / m2 ^2)

(note this formula does not subtract 3), and as a result a normal distribution would have a kurtosis of 3 according to this definition.

Further, sometimes a statistical package will use (n-1) in place of (n) for these computations, adding further complications.

Consider this simple data file.
1987
1987
1991
1992
1992
1992
1992
1993
1994
1994
1995

Stata

If we use Stata to compute the kurtosis, we get the following result
input x
1987
1987
1991
1992
1992
1992
1992
1993
1994
1994
1995
end

summ x, detail
                              x
-------------------------------------------------------------
      Percentiles      Smallest
 1%         1987           1987
 5%         1987           1987
10%         1987           1991       Obs                  11
25%         1991           1992       Sum of Wgt.          11

50%         1992                      Mean           1991.727
                        Largest       Std. Dev.      2.611165
75%         1994           1993
90%         1994           1994       Variance       6.818182
95%         1995           1994       Skewness      -.8895014
99%         1995           1995       Kurtosis       2.767989
Stata uses the method shown by Bock, namely

Kurtosis = (m4 / m2 ^2)

SAS

In SAS, we have two choices when computing kurtosis, whether we want to use n (specified via vardef=n or n-1 by not specifying vardef=n). Either way, SAS subtracts 3 from its value.
data test;
 input x;
cards;
1987 
1987 
1991 
1992 
1992 
1992 
1992 
1993 
1994 
1994 
1995 
;
run;

proc means data=test kurtosis vardef=n;
run;
Analysis Variable : x

    Kurtosis
--------------
  -0.2320107
--------------
proc means data=test kurtosis ;
run;
Analysis Variable : x

    Kurtosis
--------------
   0.4466489
--------------
We can convert the value from Stata to the value from SAS that uses the vardef=n value like this 2.767989 - 3 = -.232011. The value of .446 is not so easy to convert, but suffice it to say that it is computed using n-1 instead of n.

SPSS

SPSS also subtracts 3 when doing the computation and also appears to use  n-1 instead of n when doing the computation, since its results match those of SAS when the vardef=n is omitted, as illustrated below.
data list list / yr.
begin data.
1987 
1987 
1991 
1992 
1992 
1992 
1992 
1993 
1994 
1994 
1995 
end data.

desc /var=all /stat=kurtosis.

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California