The function CalcAndTestSkewness calculates the third moment and the skewness. Additionally it performs a test for the significance of the skewness. The array Data contains the data, the parameter OneSided controls whether the test is conducted one-sided or two-sided. The variable parameters m3 and Gamma return the third moment and the skewness, 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 skewed to the left |
FALSE |
H0: the distribution is symmetric |
Returned error codes:
≥0 ... everything is OK, the returned value represents the p-value
-1 ... the number of data points is less than 8
-2 ... standard deviation must not be zero
|