Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

SciPy · Function

stats.kurtosis

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.

How it works

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.

Syntax

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

Parameters

NameTypeDescription
aarray_likeData for which kurtosis is calculated.
axisint or None, optionalAxis along which kurtosis is calculated; None computes over the whole input.
fisherbool, optionalSelects Fisher’s definition when True and Pearson’s when False.
biasbool, optionalWhether to apply statistical-bias correction.
nan_policy{'propagate', 'raise', 'omit'}, optionalHow to handle NaN values: propagate, raise, or omit.
keepdimsbool, optionalWhether reduced axes are retained with length one.

Returns

An array containing kurtosis values along the selected axis.

Key points

  • Computes either Fisher or Pearson kurtosis for the supplied data.
  • The statistic is the fourth central moment divided by variance squared.
  • Fisher mode subtracts 3 from the moment-based result.
  • Pearson mode uses 3 as the normal-distribution reference value.
  • Set bias to False to request statistical-bias correction.

Common mistakes

  • Constant input has a special result: -3 with Fisher’s definition and 0 with Pearson’s definition.

Example: Compute sample kurtosis

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.

When to use it

Characterize tail and peak behavior beyond mean and variance.

Distribution diagnostics

Add a shape statistic to numerical or machine-learning features.

Feature engineering

Compare batch distribution shape across time or operating conditions.

Quality monitoring

Interview questions

QWhat does scipy.stats.kurtosis measure, and how do Fisher and Pearson definitions differ?

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.

QHow does axis affect the calculation?

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.

QWhat does the bias parameter control?

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.skew
  • scipy.stats.moment
  • scipy.stats.kurtosistest

Source: scipy.stats.kurtosis. Checked 2026-10-15.