Function kurtosis

  • Find the kurtosis of an array. Kurtosis describes the extremeness of the tails of a population distribution and is an indicator of data outliers. High kurtosis means that a data set has tail data that is more extreme than a normal distribution. Low kurtosis means the tail data is less extreme than a normal distribution.

    Parameters

    • array: any[]

      An array of length n where n>3.

    • Optional iteratee: ((o) => number)

      The iteratee invoked on each element.

        • (o): number
        • Parameters

          • o: any

          Returns number

    Returns number

    Returns the kurtosis.

    Since

    0.5.1

    Example

    kurtosis([1, 2, 3])
    // => 0

    const objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]
    kurtosis(objects, ({ n }) => n)
    // => 0