scipy.stats.kurtosis

Kurtosis quantifies how much of a probability distribution’s data are concentrated towards the mean as opposed to the tails. 

Kurtosis is the fourth central moment divided by the square of the variance. 

Syntax:

scipy.stats.kurtosis(a, axis=0, fisher=True, bias=True, nan_policy=’propagate’, *, keepdims=False

where,

  1. Input array – Data for which the kurtosis is calculated..
  2. axis ( int , float ) { # optional } – Axis along which statistics are calculated. The default axis is 0.
  3. fisher ( bool ) { # optional } – If True, Fisher’s definition is used. If False, Pearson’s definition is used.
  4. bias ( bool ) { # optional } – If False, then the calculations are corrected for statistical bias.
  5. nan_policy – { ‘propagate’,’raise’,’omit’ } { # optional ) – Handle the NAN inputs.
  6. keepdims( bool ) ( # optional ) – default is false.  broadcast result correctly against the input array.

Returns:

  • kurtosis array – along the given axis.

Python3

# importing the stats module
from scipy import stats as st
 
# the random dataset
dataset = st.norm.rvs(size=88)
 
# calling the kurtosis function
print(st.kurtosis(dataset))

                    

Output:

0.04606780907050423

SciPy – Stats

The scipy.stats is the SciPy sub-package. It is mainly used for probabilistic distributions and statistical operations. There is a wide range of probability functions.

There are three classes:

Class

Description

rv_continuousFor continuous random variables, we can create specialized distribution subclasses and instances.
rv_discreteFor discrete random variables, we can create specialized distribution subclasses and instances.
rv_histogramgenerate specific distribution histograms.

Similar Reads

Continuous Random Variables

A continuous random variable is a probability distribution when the random variable X can have any value. The mean is defined by the location (loc) keyword. The standard deviation is determined by the scale (scale) keyword....

Discrete Random Variables

...

Result analysis

Only a countable number of values can be assigned to discrete random variables. L is an additional integer parameter that can be added to any discrete distribution. The general distribution p and the standard distribution p0 have the following relationship:...

scipy.stats.kurtosis

...

scipy.stats.mstats.zscore

...

scipy.stats.skew

...

scipy.stats.energy_distance

...

scipy.stats.mode

...

scipy.stats.variation

Kurtosis quantifies how much of a probability distribution’s data are concentrated towards the mean as opposed to the tails....

scipy.stats.rankdata

...

Contact Us