public double getSampleKurtosis() {
    if(!(m2 > 0) || !(n > 3)) {
      throw new ArithmeticException("Kurtosis not defined when variance is 0 or weight <= 3.0!");
    }
    final double nm1 = n - 1.;
    return (nm1 / ((n - 2.) * (n - 3.))) * (n * (n + 1) * m4 / (m2 * m2) - 3 * nm1) + 3;
  }
public double getSampleKurtosis ( ) { if ( ! ( m2 > 0 ) || ! ( n > 3 ) ) { throw new ArithmeticException ( "Kurtosis not defined when variance is 0 or weight <= 3.0!" ) ; } final double nm1 = n - 1. ; return ( nm1 / ( ( n - 2. ) * ( n - 3. ) ) ) * ( n * ( n + 1 ) * m4 / ( m2 * m2 ) - 3 * nm1 ) + 3 ; }
Get the kurtosis using sample variance.

Note: this formula does <em>not</em> include the correction factor, such
that a normal distribution should be 0.

@return Kurtosis