Sunday, July 12, 2026
HomeLanguagesscipy stats.kurtosis() function | Python

scipy stats.kurtosis() function | Python

scipy.stats.kurtosis(array, axis=0, fisher=True, bias=True) function calculates the kurtosis (Fisher or Pearson) of a data set. It is the fourth central moment divided by the square of the variance. It is a measure of the “tailedness” i.e. descriptor of shape of probability distribution of a real-valued random variable. In simple terms, one can say it is a measure of how heavy tail is compared to a normal distribution. Its formula –

Parameters : array : Input array or object having the elements. axis : Axis along which the kurtosis value is to be measured. By default axis = 0. fisher : Bool; Fisher’s definition is used (normal 0.0) if True; else Pearson’s definition is used (normal 3.0) if set to False. bias : Bool; calculations are corrected for statistical bias, if set to False. Returns : Kurtosis value of the normal distribution for the data set.

Code #1: 

Python3




# Graph using numpy.linspace()
# finding kurtosis
 
from scipy.stats import kurtosis
import numpy as np
import pylab as p
 
x1 = np.linspace( -5, 5, 1000 )
y1 = 1./(np.sqrt(2.*np.pi)) * np.exp( -.5*(x1)**2  )
 
p.plot(x1, y1, '*')
 
 
print( '\nKurtosis for normal distribution :', kurtosis(y1))
 
print( '\nKurtosis for normal distribution :',
      kurtosis(y1, fisher = False))
 
print( '\nKurtosis for normal distribution :',
      kurtosis(y1, fisher = True))


Output :


Kurtosis for normal distribution : -0.3073930877422071

Kurtosis for normal distribution : 2.692606912257793

Kurtosis for normal distribution : -0.3073930877422071
RELATED ARTICLES

Most Popular

Dominic
32519 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6901 POSTS0 COMMENTS
Nicole Veronica
12017 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12111 POSTS0 COMMENTS
Shaida Kate Naidoo
7021 POSTS0 COMMENTS
Ted Musemwa
7263 POSTS0 COMMENTS
Thapelo Manthata
6978 POSTS0 COMMENTS
Umr Jansen
6968 POSTS0 COMMENTS