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,
- Input array – Data for which the kurtosis is calculated..
- axis ( int , float ) { # optional } – Axis along which statistics are calculated. The default axis is 0.
- fisher ( bool ) { # optional } – If True, Fisher’s definition is used. If False, Pearson’s definition is used.
- bias ( bool ) { # optional } – If False, then the calculations are corrected for statistical bias.
- nan_policy – { ‘propagate’,’raise’,’omit’ } { # optional ) – Handle the NAN inputs.
- 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_continuous | For continuous random variables, we can create specialized distribution subclasses and instances. |
rv_discrete | For discrete random variables, we can create specialized distribution subclasses and instances. |
rv_histogram | generate specific distribution histograms. |
Contact Us