### Question:
Descriptives { public static double kurtosis(FlatDataCollection flatDataCollection) { int n = count(flatDataCollection); if(n<=3) { throw new IllegalArgumentException("The provided collection must have more than 3 elements."); } double mean = mean(flatDataCollection); double m4 = moment(flatDataCollection, 4, mean); double m2 = moment(flatDataCollection, 2, mean); double s = (n/(n-1.0))*m2; double Mcapital4=n*m4; double Mcapital2=n*m2; double kurtosis=(n*(n+1.0)*Mcapital4-3*Mcapital2*Mcapital2*(n-1.0))/((n-1.0)*(n-2.0)*(n-3.0)*s*s); return kurtosis; }  static int count(Iterable it); static double sum(FlatDataCollection flatDataCollection); static double mean(FlatDataCollection flatDataCollection); static double meanSE(FlatDataCollection flatDataCollection); static double median(FlatDataCollection flatDataCollection); static double min(FlatDataCollection flatDataCollection); static double max(FlatDataCollection flatDataCollection); static double minAbsolute(FlatDataCollection flatDataCollection); static double maxAbsolute(FlatDataCollection flatDataCollection); static double range(FlatDataCollection flatDataCollection); static double geometricMean(FlatDataCollection flatDataCollection); static double harmonicMean(FlatDataCollection flatDataCollection); static double variance(FlatDataCollection flatDataCollection, boolean isSample); static double std(FlatDataCollection flatDataCollection, boolean isSample); static double cv(double std, double mean); static double moment(FlatDataCollection flatDataCollection, int r); static double moment(FlatDataCollection flatDataCollection, int r, double mean); static double kurtosis(FlatDataCollection flatDataCollection); static double kurtosisSE(FlatDataCollection flatDataCollection); static double skewness(FlatDataCollection flatDataCollection); static double skewnessSE(FlatDataCollection flatDataCollection); static AssociativeArray percentiles(FlatDataCollection flatDataCollection, int cutPoints); static AssociativeArray quartiles(FlatDataCollection flatDataCollection); static double covariance(TransposeDataList transposeDataList, boolean isSample); static double autocorrelation(FlatDataList flatDataList, int lags); static AssociativeArray frequencies(FlatDataCollection flatDataCollection); static FlatDataCollection mode(FlatDataCollection flatDataCollection); static void normalize(AssociativeArray associativeArray); static void normalizeExp(AssociativeArray associativeArray);  }### Answer:
@Test public void testKurtosis() { logger.info("kurtosis"); FlatDataCollection flatDataCollection = generateFlatDataCollection(); double expResult = -0.74454696650836; double result = Descriptives.kurtosis(flatDataCollection); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); }