Kurtosis

Chi distribution excess kurtosis.

The excess kurtosis for a chi random variable with degrees of freedom k is

upper K u r t left-parenthesis upper X right-parenthesis equals StartFraction 2 Over sigma squared EndFraction left-parenthesis 1 minus mu sigma gamma 1 minus sigma squared right-parenthesis

where μ is the mean of the distribution, σ its standard deviation, and γ_1 the skewness.

Usage

var kurtosis = require( '@stdlib/math/base/dists/chi/kurtosis' );

kurtosis( k )

Returns the excess kurtosis of a chi distribution with degrees of freedom k.

var v = kurtosis( 9.0 );
// returns ~0.011

v = kurtosis( 0.5 );
// returns ~2.534

If provided k <= 0, the function returns NaN.

var v = kurtosis( -1.0 );
// returns NaN

Examples

var randu = require( '@stdlib/random/base/randu' );
var round = require( '@stdlib/math/base/special/round' );
var kurtosis = require( '@stdlib/math/base/dists/chi/kurtosis' );

var k;
var v;
var i;

for ( i = 0; i < 10; i++ ) {
    k = randu() * 20.0;
    v = kurtosis( k );
    console.log( 'k: %d, Kurt(X,k): %d', k.toFixed( 4 ), v.toFixed( 4 ) );
}