quartile
statisticsCalculates quartile values (0.25, 0.5, 0.75)
Syntax
quartile(array|dataframe, percentile) Parameters
array|dataframe (array or dataframe) The data to calculate quartiles from
percentile (number) The quartile to calculate (0.25, 0.5, or 0.75)
Returns
number The value at the specified quartile
Examples
First quartile (Q1)
Input:
.values | quartile(0.25) Output:
25.5 Second quartile (median)
Input:
.values | quartile(0.5) Output:
50.0 Third quartile (Q3)
Input:
.values | quartile(0.75) Output:
75.25 The quartile() function calculates quartile values, which divide the data into four equal parts. Common quartiles are 0.25 (Q1), 0.5 (Q2/median), and 0.75 (Q3).
Usage
Use quartile() for statistical analysis, identifying data distribution, and detecting outliers using the interquartile range (IQR).