# kurtosis

Kurtosis

## Syntax

## Description

returns the sample kurtosis of `k`

= kurtosis(`X`

)`X`

.

If

`X`

is a vector, then`kurtosis(X)`

returns a scalar value that is the kurtosis of the elements in`X`

.If

`X`

is a matrix, then`kurtosis(X)`

returns a row vector that contains the sample kurtosis of each column in`X`

.If

`X`

is a multidimensional array, then`kurtosis(X)`

operates along the first nonsingleton dimension of`X`

.

specifies whether to correct for bias (`k`

= kurtosis(`X`

,`flag`

)`flag`

is
`0`

) or not (`flag`

is `1`

,
the default). When `X`

represents a sample from a population, the
kurtosis of `X`

is biased, meaning it tends to differ from the
population kurtosis by a systematic amount based on the sample size. You can set
`flag`

to `0`

to correct for this systematic
bias.

returns the kurtosis over the dimensions specified in the vector
`k`

= kurtosis(`X`

,`flag`

,`vecdim`

)`vecdim`

. For example, if `X`

is a 2-by-3-by-4
array, then `kurtosis(X,1,[1 2])`

returns a 1-by-1-by-4 array. Each
element of the output array is the biased kurtosis of the elements on the
corresponding page of `X`

.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

Kurtosis is a measure of how outlier-prone a distribution is. The kurtosis of the
normal distribution is 3. Distributions
that are more outlier-prone than the normal distribution have kurtosis greater than 3;
distributions that are less outlier-prone have kurtosis less than 3. Some definitions of
kurtosis subtract 3 from the computed value, so that the normal distribution has
kurtosis of 0. The `kurtosis`

function does not use this
convention.

The kurtosis of a distribution is defined as

$$k=\frac{E{(x-\mu )}^{4}}{{\sigma}^{4}},$$

where *μ* is the mean of *x*, *σ*
is the standard deviation of *x*, and
*E*(*t*) represents the expected value of the
quantity *t*. The `kurtosis`

function computes a
sample version of this population value.

When you set `flag`

to `1`

, the kurtosis is biased,
and the following equation applies:

$${k}_{1}=\frac{\frac{1}{n}{\displaystyle \sum _{i=1}^{n}{\left({x}_{i}-\overline{x}\right)}^{4}}}{{\left(\frac{1}{n}{\displaystyle \sum _{i=1}^{n}{\left({x}_{i}-\overline{x}\right)}^{2}}\right)}^{2}}.$$

When you set `flag`

to `0`

,
`kurtosis`

corrects for the systematic bias, and the following
equation applies:

$${k}_{0}=\frac{n-1}{\left(n-2\right)\left(n-3\right)}\left(\left(n+1\right){k}_{1}-3\left(n-1\right)\right)+3.$$

This bias-corrected equation requires that `X`

contain at least four elements.

## Extended Capabilities

## Version History

**Introduced before R2006a**