The function CalcAndTestKurtosis calculates the fourth moment and the kurtosis. Additionally it performs a test for the significance of the kurtosis. The array Data contains the data, the parameter OneSided controls whether the test is conducted one-sided or two-sided. The variable parameters m4 and Gamma return the fourth moment and the kurtosis, respectively. The variable zStatistic returns the value of the normally distributed statistic for the test.
The function value is the probability of the test. The null hypothesis has to be rejected if the probability is less than the level of significance. Depending on the parameter OneSided the following null hypotheses are assumed:
OneSided |
Null Hypothesis |
TRUE |
H0: the distribution is mesokurtic in comparison to leptokurtic or platykurtic |
FALSE |
H0: the distribution is mesokurtic |
Returned error codes:
≥0 ... everything is OK, the returned value represents the p-value
-1 ... the number of data points is less than 20
-2 ... standard deviation must not be zero
|