Documentation/Calc Functions/QUARTILE.INC

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

QUARTILE.INC

Category:

Statistical Analysis

Summary:

Calculates the quartile of a set of data points. Quartiles describe the division of a data set into four intervals based on the values of the data. The lowest 25% of the values are smaller than the first or lower quartile (equivalent to the 25th percentile). The lowest 50% of the values are smaller than the second quartile and this is also known as the median (equivalent to the 50th percentile). The lowest 75% of the values are smaller than the third or upper quartile (equivalent to the 75th percentile). This function uses a percentile-based value from 0 to 1, inclusive for calculation.

Syntax:

QUARTILE.INC(Data; Type)

Returns:

Returns a real number which is the requested quartile of the specified data set.

Arguments:

Data is an array or a reference to a range of cells representing the array of data in the sample.

Type is an integer value from the range {0,1,2,3,4} or a reference to the cell containing that number which represents the type of quartile. (0 = MIN, 1 = 25%, 2 = 50% (MEDIAN), 3 = 75% and 4 = MAX.)

  • If Type is a non-integer real number then the function uses the floor value, i.e. it is truncated to an integer. However, if the Type is less than 0 or greater than or equal to 5 then the function returns an error value.

Additional details:

  • Calc functions MIN, MEDIAN, and MAX will return the same value as QUARTILE.INC for the value of Type equal to 0, 2, and 4, respectively.
Note pin.svg

The difference between QUARTILE.INC/QUARTILE and QUARTILE.EXC is that the QUARTILE.INC function bases its calculation on a percentile range of 0 to 1 inclusive, whereas the QUARTILE.EXC function bases its calculation on a percentile range of 0 to 1 exclusive.


Examples:

Formula Description Returns
=QUARTILE.INC(A1:A5;4) where A1:A5 contains 5,7,3,2,9 Calculates the maximum value of the data in cells A1:A5. Here, the function will return a percentile-based value. 9
=QUARTILE.INC(A1:A5;3) where A1:A5 contains 5,7,3,2,9 Calculates the third or upper quartile value of the data in cells A1:A5. Here, the function will return a percentile-based value. 7
=QUARTILE.INC(A1:A5;2) where A1:A5 contains 5,7,3,2,9 Calculates the median value of the data in cells A1:A5. Here, the function will return a percentile-based value. 5
=QUARTILE.INC(A1:A5;1) where A1:A5 contains 5,7,3,2,9 Calculates the first or lower quartile value of the data in cells A1:A5. Here, the function will return a percentile-based value. 3
=QUARTILE.INC(A1:A5;0) where A1:A5 contains 5,7,3,2,9 Calculates the minimum value of the data in cells A1:A5. Here, the function will return a percentile-based value. 2
=QUARTILE.INC(A1:A5;3.6) where A1:A5 contains 5,7,3,2,9 Here the value of Type is truncated to 3. Here, the function will return a percentile-based value. 7
=QUARTILE.INC(A1:A6;3.6) where A1:A6 contains 5,7,3,2,8,9 Calculates the third or upper quartile value of the data in cells A1:A6. Calculates the value of which 75% of the scale corresponds to the lowest to highest values in the range A1:A5. Here the value of Type is truncated to 3. Here since no direct number from the range is available the function will return a percentile-based value. Here, the function will return a percentile-based value. 7.75

Related LibreOffice functions:

QUARTILE.EXC

QUARTILE

MAX

MIN

MEDIAN

PERCENTILE.INC

PERCENTRANK.INC

RANK

ODF standard:

None

Equivalent Excel functions:

QUARTILE.INC