All problems
Population Excess Kurtosis
Problem
Return the population excess kurtosis: (1/n) * sum((x - mean)^4) / std^4 - 3. Return 0.0 if data is empty or the standard deviation is zero.
Hint
Fourth central moment over variance squared, minus 3.
Test cases
case 1
in: [[1,2,3,4,5]]
expected: -1.3
case 2
in: [[1,2,3,4,10]]
expected: -0.21199999999999974
case 3
in: [[5,5,5]]
expected: 0
case 4
in: [[1,1,2,2]]
expected: -2
case 5
in: [[1,2,3]]
expected: -1.5
Starter codePython
def kurtosis(data):
# Your code here
pass5 test cases · run your code against them in the editor