[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'Math' (#rtl)

# MomentSkewKurtosis

Return 4 first moments of distribution

## Declaration

Source position: math.pp line 535

`procedure MomentSkewKurtosis(`
`const data: array of Single;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`); procedure MomentSkewKurtosis(`
`const data: PSingle;`
`const N: Integer;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`); procedure MomentSkewKurtosis(`
`const data: array of Double;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`); procedure MomentSkewKurtosis(`
`const data: PDouble;`
`const N: Integer;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`); procedure MomentSkewKurtosis(`
`const data: array of Extended;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`); procedure MomentSkewKurtosis(`
`const data: PExtended;`
`const N: Integer;`
`out m1: Float;`
`out m2: Float;`
`out m3: Float;`
`out m4: Float;`
`out skew: Float;`
`out kurtosis: Float`
`);`

## Description

momentskewkurtosis calculates the 4 first moments of the distribution of value in data and returns them in m1,m2,m3 and m4, as well as the skew and kurtosis.

## Errors

None.

## See also

mean |  | Return mean value of array
meanandstddev |  | Return mean and standard deviation of array

## Example

    program Example32;

    { Program to demonstrate the momentskewkurtosis function. }

    uses math;

    var distarray:array[1..1000] of float;
        I:longint;
        m1,m2,m3,m4,skew,kurtosis:float;

    begin
      randomize;
      for I:=low(distarray) to high(distarray) do
        distarray[i]:=random;
      momentskewkurtosis(DistArray,m1,m2,m3,m4,skew,kurtosis);

      Writeln ('1st moment : ',m1:8:6);
      Writeln ('2nd moment : ',m2:8:6);
      Writeln ('3rd moment : ',m3:8:6);
      Writeln ('4th moment : ',m4:8:6);
      Writeln ('Skew       : ',skew:8:6);
      Writeln ('kurtosis   : ',kurtosis:8:6);
    end.

Documentation generated on: May 14 2021