Chalkboard - v3.0.4
    Preparing search index...

    Function quartile

    • Calculates a quartile of an array.

      Parameters

      • arr: number[]

        The array

      • type: "Q1" | "Q2" | "Q3"

        The type of quartile, which can be "Q1", "Q2", or "Q3"

      Returns number

      const result = Chalkboard.stat.quartile([1, 2, 3, 4, 5, 6, 7], "Q2"); // Returns the median