()
| 188 | } |
| 189 | |
| 190 | @Override |
| 191 | public double skewness() |
| 192 | { |
| 193 | double mean = mean(); |
| 194 | |
| 195 | double tmp = 0; |
| 196 | |
| 197 | for(int i = startIndex; i < endIndex; i++) |
| 198 | tmp += pow(array[i]-mean, 3); |
| 199 | |
| 200 | double s1 = tmp / (pow(standardDeviation(), 3) * (array.length-1) ); |
| 201 | |
| 202 | if(array.length >= 3)//We can use the bias corrected formula |
| 203 | return sqrt(array.length*(array.length-1))/(array.length-2)*s1; |
| 204 | |
| 205 | return s1; |
| 206 | } |
| 207 | |
| 208 | @Override |
| 209 | public double kurtosis() |
nothing calls this directly
no test coverage detected