Characterize tail and peak behavior beyond mean and variance.
Distribution diagnostics
SciPy · Function
Computes dataset kurtosis along an axis, using Fisher’s excess-kurtosis convention or Pearson’s convention. It can optionally correct statistical bias and control NaN handling.
The function computes the fourth central moment divided by the squared variance along the selected axis. By default it reports Fisher’s excess kurtosis, subtracting 3 so a normal distribution has value 0; selecting Pearson’s definition leaves the normal-reference value at 3, while bias correction uses k-statistics.
scipy.stats.kurtosis(a, axis=0, fisher=True, bias=True, nan_policy='propagate', *, keepdims=False)| Name | Type | Description |
|---|---|---|
a | array_like | Data for which kurtosis is calculated. |
axis | int or None, optional | Axis along which kurtosis is calculated; None computes over the whole input. |
fisher | bool, optional | Selects Fisher’s definition when True and Pearson’s when False. |
bias | bool, optional | Whether to apply statistical-bias correction. |
nan_policy | {'propagate', 'raise', 'omit'}, optional | How to handle NaN values: propagate, raise, or omit. |
keepdims | bool, optional | Whether reduced axes are retained with length one. |
An array containing kurtosis values along the selected axis.
import numpy as np
from scipy.stats import kurtosis
x = np.array([1, 2, 3, 4, 5])
print(kurtosis(x))
print(kurtosis(x, fisher=False, bias=False))Computes excess kurtosis by default, then Pearson kurtosis with bias correction.
Distribution diagnostics
Feature engineering
Quality monitoring
It measures the fourth central moment relative to the squared variance. With Fisher’s definition, 3 is subtracted, so a normal distribution has kurtosis 0; Pearson’s definition gives 3 instead.
Follow-up: How would you obtain an unbiased estimate? Set bias=False, which applies a correction based on k-statistics.
axis chooses the dimension over which the statistic is computed, defaulting to axis 0. Passing axis=None computes one value over the entire input.
Follow-up: What shape should you expect from a multidimensional input? The selected axis is reduced, while other dimensions remain represented in the result.
bias controls statistical-bias correction. The default True uses the ordinary moment-based calculation; False requests a corrected calculation using k-statistics.
Follow-up: When might correction matter most? It is particularly relevant when estimating distribution shape from a limited sample.
scipy.stats.skewscipy.stats.momentscipy.stats.kurtosistest