first quartile - part-cw/lambdanative GitHub Wiki

(first-quartile lst)

first-quartile returns the value of the first quartile of the list, the point at which 25% of the list is less than.

Note: If the length of the list is not a multiple of 4, it will be slightly less than 25% of the list that is less.

Parameter Description
lst List to operate on

Example

Example 1: Show some quartile information of a list

> (define lst '(1 2 3 4 5 6 7 8 9))
> (first-quartile lst)
3
> (median lst)
5
> (third-quartile lst)
8
> (interquartile lst)
5