Advertisement
elena1234

Kurtosis in Python

Jul 25th, 2022 (edited)
1,196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. Kurtosis is the "peakedness" of a distribution.
  2. The kurtosis of a normal distribution is 3.
  3. If a given distribution has a kurtosis less than 3, it is said to be platykurtic, which means it tends to produce fewer and less   extreme outliers than the normal distribution.
  4. If a given distribution has a kurtosis greater than 3, it is said to be leptokurtic, which means it tends to produce more outliers than the normal distribution.
  5.  
  6.  
  7. from scipy.stats import kurtosis
  8. # Creating a dataset
  9. dataset = [88, 85, 82, 97, 67, 77, 74, 86,
  10.            81, 95, 77, 88, 85, 76, 81]
  11. # Calculate the kurtosis
  12. print(kurtosis(dataset, axis=0, bias=False))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement