# Statistical Functions Part Four

## AVERAGEIF

Returns the arithmetic mean of all cells in a range that satisfy a given condition. The AVERAGEIF function sums up all the results that match the logical test and divides this sum by the quantity of selected values.

## AVERAGEIFS

Returns the arithmetic mean of all cells in a range that satisfy given multiple criteria. The AVERAGEIFS function sums up all the results that match the logical tests and divides this sum by the quantity of selected values.

\<bookmark_value\>AVEDEV function\</bookmark_value\>\<bookmark_value\>averages;statistical functions\</bookmark_value\>

## AVEDEV

Returns the average of the absolute deviations of data points from their mean. Displays the diffusion in a data set.

#### Syntax

AVEDEV(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=AVEDEV(A1:A50)

\<bookmark_value\>AVERAGE function\</bookmark_value\>

## AVERAGE

Returns the average of the arguments.

#### Syntax

AVERAGE(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=AVERAGE(A1:A50)

\<bookmark_value\>AVERAGEA function\</bookmark_value\>

## AVERAGEA

Returns the average of the arguments. The value of a text is 0.

#### Syntax

AVERAGEA(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

#### Example

=AVERAGEA(A1:A50)

\<bookmark_value\>MAX function\</bookmark_value\>

## MAX

Returns the maximum value in a list of arguments.

Returns 0 if no numeric value and no error was encountered in the cell range(s) passed as cell reference(s). Text cells are ignored by MIN() and MAX(). The functions MINA() and MAXA() return 0 if no value (numeric or text) and no error was encountered. Passing a literal string argument to MIN() or MAX(), e.g. MIN("string"), still results in an error.

#### Syntax

MAX(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=MAX(A1;A2;A3;50;100;200) returns the largest value from the list.

=MAX(A1:B100) returns the largest value from the list.

\<bookmark_value\>MAXA function\</bookmark_value\>

## MAXA

Returns the maximum value in a list of arguments. In opposite to MAX, here you can enter text. The value of the text is 0.

The functions MINA() and MAXA() return 0 if no value (numeric or text) and no error was encountered.

#### Syntax

MAXA(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

#### Example

=MAXA(A1;A2;A3;50;100;200;"Text") returns the largest value from the list.

=MAXA(A1:B100) returns the largest value from the list.

\<bookmark_value\>MEDIAN function\</bookmark_value\>

## MEDIAN

Returns the median of a set of numbers. In a set containing an uneven number of values, the median will be the number in the middle of the set and in a set containing an even number of values, it will be the mean of the two values in the middle of the set.

#### Syntax

MEDIAN(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

for an odd number: =MEDIAN(1; 5; 9; 20; 21) returns 9 as the median value.

for an even number: =MEDIAN(1; 5; 9; 20) returns the average of the two middle values 5 and 9, thus 7.

\<bookmark_value\>MIN function\</bookmark_value\>

## MIN

Returns the minimum value in a list of arguments.

Returns 0 if no numeric value and no error was encountered in the cell range(s) passed as cell reference(s). Text cells are ignored by MIN() and MAX(). The functions MINA() and MAXA() return 0 if no value (numeric or text) and no error was encountered. Passing a literal string argument to MIN() or MAX(), e.g. MIN("string"), still results in an error.

#### Syntax

MIN(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=MIN(A1:B100) returns the smallest value in the list.

\<bookmark_value\>MINA function\</bookmark_value\>

## MINA

Returns the minimum value in a list of arguments. Here you can also enter text. The value of the text is 0.

The functions MINA() and MAXA() return 0 if no value (numeric or text) and no error was encountered.

#### Syntax

MINA(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

#### Example

=MINA(1; "Text"; 20) returns 0.

=MINA(A1:B100) returns the smallest value in the list.

\<bookmark_value\>MODE function\</bookmark_value\>\<bookmark_value\>most common value\</bookmark_value\>

## MODE

Returns the most common value in a data set. If there are several values with the same frequency, it returns the smallest value. An error occurs when a value doesn't appear twice. This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)

#### Syntax

MODE(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=MODE(A1:A50)

\<bookmark_value\>MODE function\</bookmark_value\>\<bookmark_value\>most common value\</bookmark_value\>

## MODE.MULT

Returns a vertical array of the statistical modes (the most frequently occurring values) within a list of supplied numbers. This function is available since LibreOffice 4.3.

#### Syntax

MODE.MULT(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. As the MODE.MULT function returns an array of values, it must be entered as an array formula. If the function is not entered as an array formula, only the first mode is returned, which is the same as using the MODE.SNGL function.

#### Example

=MODE(A1:A50)

\<bookmark_value\>MODE function\</bookmark_value\>\<bookmark_value\>most common value\</bookmark_value\>

## MODE.SNGL

Returns the most frequently occurring, or repetitive, value in an array or range of data. If there are several values with the same frequency, it returns the smallest value. An error occurs when a value doesn't appear twice. This function is available since LibreOffice 4.3.

#### Syntax

MODE.SNGL(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers. If the data set contains no duplicate data points, MODE.SNGL returns the #VALUE! error value.

#### Example

=MODE(A1:A50)

\<bookmark_value\>NEGBINOMDIST function\</bookmark_value\>\<bookmark_value\>negative binomial distribution\</bookmark_value\>

## NEGBINOMDIST

Returns the negative binomial distribution.

#### Syntax

NEGBINOMDIST(X; R; SP)

\<emph\>X\</emph\> represents the value returned for unsuccessful tests.

\<emph\>R\</emph\> represents the value returned for successful tests.

\<emph\>SP\</emph\> is the probability of the success of an attempt.

#### Example

=NEGBINOMDIST(1; 1; 0.5) returns 0.25.

\<bookmark_value\>NEGBINOMDIST function\</bookmark_value\>\<bookmark_value\>negative binomial distribution\</bookmark_value\>

## NEGBINOMDIST

Returns the negative binomial density or distribution function. This function is available since LibreOffice 4.3.

#### Syntax

NEGBINOM.DIST(X; R; SP; Cumulative)

\<emph\>X\</emph\> represents the value returned for unsuccessful tests.

\<emph\>R\</emph\> represents the value returned for successful tests.

\<emph\>SP\</emph\> is the probability of the success of an attempt.

\<emph\>C\</emph\> = 0 calculates the density function \<emph\>C\</emph\> = 1 the distribution.

#### Example

=NEGBINOMDIST(1; 1; 0.5) returns 0.25.

=NEGBINOMDIST(1; 1; 0.5) returns 0.25.

\<bookmark_value\>NORMDIST function\</bookmark_value\>\<bookmark_value\>density function\</bookmark_value\>

## NORMDIST

Returns the density function or the normal cumulative distribution.

#### Syntax

NORMDIST(Number; Mean; StDev [; C])

\<emph\>Number\</emph\> is the value of the distribution based on which the normal distribution is to be calculated.

\<emph\>Mean\</emph\> is the mean value of the distribution.

\<emph\>STDEV\</emph\> is the standard deviation of the distribution.

\<emph\>C\</emph\> = 0 calculates the density function; \<emph\>C\</emph\> = 1 calculates the distribution.

#### Example

=NORMDIST(70; 63; 5; 0) returns 0.03.

=NORMDIST(70; 63; 5; 1) returns 0.92.

\<bookmark_value\>NORMDIST function\</bookmark_value\>\<bookmark_value\>density function\</bookmark_value\>

## NORMDIST

Returns the density function or the normal cumulative distribution. This function is available since LibreOffice 4.3.

#### Syntax

NORMDIST(Number; Mean; STDEV; C)

\<emph\>Number\</emph\> is the value of the distribution based on which the normal distribution is to be calculated.

\<emph\>Mean\</emph\> is the mean value of the distribution.

\<emph\>STDEV\</emph\> is the standard deviation of the distribution.

\<emph\>C\</emph\> = 0 calculates the density function; \<emph\>C\</emph\> = 1 calculates the distribution.

#### Example

=NORMDIST(70; 63; 5; 0) returns 0.03.

=NORMDIST(70; 63; 5; 1) returns 0.92.

\<bookmark_value\>NORMINV function\</bookmark_value\>\<bookmark_value\>normal distribution;inverse of\</bookmark_value\>

## NORMINV

Returns the inverse of the normal cumulative distribution.

#### Syntax

NORMINV(Number; Mean; STDEV)

\<emph\>Number\</emph\> represents the probability value used to determine the inverse normal distribution.

\<emph\>Mean\</emph\> represents the mean value in the normal distribution.

\<emph\>STDEV\</emph\> represents the standard deviation of the normal distribution.

#### Example

=NORMINV(0.9; 63; 5) returns 69.41. If the average egg weighs 63 grams with a standard deviation of 5, then there will be 90% probability that the egg will not be heavier than 69.41g grams.

\<bookmark_value\>NORMINV function\</bookmark_value\>\<bookmark_value\>normal distribution;inverse of\</bookmark_value\>

## NORMINV

Returns the inverse of the normal cumulative distribution. This function is available since LibreOffice 4.3.

#### Syntax

NORMINV(Number; Mean; STDEV)

\<emph\>Number\</emph\> represents the probability value used to determine the inverse normal distribution.

\<emph\>Mean\</emph\> represents the mean value in the normal distribution.

\<emph\>STDEV\</emph\> represents the standard deviation of the normal distribution.

#### Example

=NORMINV(0.9; 63; 5) returns 69.41. If the average egg weighs 63 grams with a standard deviation of 5, then there will be 90% probability that the egg will not be heavier than 69.41g grams.

\<bookmark_value\>PEARSON function\</bookmark_value\>

## PEARSON

Returns the Pearson product moment correlation coefficient r.

#### Syntax

PEARSON(Data_1; Data_2)

\<emph\>Data_1\</emph\> represents the array of the first data set.

\<emph\>Data_2\</emph\> represents the array of the second data set.

#### Example

=PEARSON(A1:A30; B1:B30) returns the Pearson correlation coefficient of both data sets.

\<bookmark_value\>PERCENTILE function\</bookmark_value\>

## PERCENTILE

Returns the alpha-percentile of data values in an array. A percentile returns the scale value for a data series which goes from the smallest (Alpha=0) to the largest value (alpha=1) of a data series. For Alpha = 25%, the percentile means the first quartile; Alpha = 50% is the MEDIAN.

#### Syntax

PERCENTILE(Data;Alpha)

\<emph\>Data\</emph\> represents the array of data.

\<emph\>Alpha\</emph\> represents the percentage of the scale between 0 and 1. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=PERCENTILE(A1:A50; 0.1) represents the value in the data set, which equals 10% of the total data scale in A1:A50.

\<bookmark_value\>PERCENTILE function\</bookmark_value\>

## PERCENTILE.EXC

Returns the Alpha'th percentile of a supplied range of values for a given value of Alpha, within the range 0 to 1 (exclusive). A percentile returns the scale value for a data series which goes from the smallest (Alpha=0) to the largest value (Alpha=1) of a data series. For Alpha = 25%, the percentile means the first quartile; Alpha = 50% is the MEDIAN. If Alpha is not a multiple of 1/(n+1), (where n is the number of values in the supplied array), the function interpolates between the values in the supplied array, to calculate the percentile value. However, if Alpha is less than 1/(n+1) or Alpha is greater than n/(n+1), the function is unable to interpolate, and so returns an error. The difference between PERCENTILE.INC and PERCENTILE.EXC is that, in the PERCENTILE.INC function the value of alpha is within the range 0 to 1 inclusive, and in the PERCENTILE.EXC function, the value of alpha is within the range 0 to 1 exclusive. This function is available since LibreOffice 4.3.

#### Syntax

PERCENTILE(Data;Alpha)

\<emph\>Data\</emph\> represents the array of data.

\<emph\>Alpha\</emph\> represents the percentage of the scale between 0 and 1.

#### Example

=PERCENTILE(A1:A50; 0.1) represents the value in the data set, which equals 10% of the total data scale in A1:A50.

\<bookmark_value\>PERCENTILE function\</bookmark_value\>

## PERCENTILE.INC

Returns the alpha-percentile of data values in an array. A percentile returns the scale value for a data series which goes from the smallest (Alpha=0) to the largest value (alpha=1) of a data series. For Alpha = 25%, the percentile means the first quartile; Alpha = 50% is the MEDIAN. The difference between PERCENTILE.INC and PERCENTILE.EXC is that, in the PERCENTILE.INC function the value of alpha is within the range 0 to 1 inclusive, and in the PERCENTILE.EXC function, the value of alpha is within the range 0 to 1 exclusive. This function is available since LibreOffice 4.3.

#### Syntax

PERCENTILE(Data;Alpha)

\<emph\>Data\</emph\> represents the array of data.

\<emph\>Alpha\</emph\> represents the percentage of the scale between 0 and 1.

#### Example

=PERCENTILE(A1:A50; 0.1) represents the value in the data set, which equals 10% of the total data scale in A1:A50.

\<bookmark_value\>PERCENTRANK function\</bookmark_value\>

## PERCENTRANK

Returns the percentage rank of a value in a sample.

#### Syntax

PERCENTRANK(Data; Value [; Significance])

\<emph\>Data\</emph\> represents the array of data in the sample.

\<emph\>Value\</emph\> represents the value whose percentile rank must be determined.

Significance An optional argument that specifies the number of significant digits that the returned percentage value is rounded to. If omitted, a value of 3 is used. This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=PERCENTRANK(A1:A50; 50) returns the percentage rank of the value 50 from the total range of all values found in A1:A50. If 50 falls outside the total range, an error message will appear.

\<bookmark_value\>PERCENTRANK function\</bookmark_value\>

## PERCENTRANK.EXC

Returns the relative position, between 0 and 1 (exclusive), of a specified value within a supplied array. The difference between PERCENTRANK.INC and PERCENTRANK.EXC is that PERCENTRANK.INC calculates a value in the range 0 to 1 inclusive, whereas the PERCENTRANK.EXC function calculates a value in the range 0 to 1 exclusive. This function is available since LibreOffice 4.3.

#### Syntax

PERCENTRANK.EXC(Data; Value [; Significance])

\<emph\>Data\</emph\> represents the array of data in the sample.

\<emph\>Value\</emph\> represents the value whose percentile rank must be determined.

Significance An optional argument that specifies the number of significant digits that the returned percentage value is rounded to.

#### Example

=PERCENTRANK(A1:A50; 50) returns the percentage rank of the value 50 from the total range of all values found in A1:A50. If 50 falls outside the total range, an error message will appear.

\<bookmark_value\>PERCENTRANK function\</bookmark_value\>

## PERCENTRANK.INC

Returns the relative position, between 0 and 1 (inclusive), of a specified value within a supplied array. The difference between PERCENTRANK.INC and PERCENTRANK.EXC is that PERCENTRANK.INC calculates a value in the range 0 to 1 inclusive, whereas the PERCENTRANK.EXC function calculates a value in the range 0 to 1 exclusive. This function is available since LibreOffice 4.3.

#### Syntax

PERCENTRANK.INC(Data; Value [; Significance])

\<emph\>Data\</emph\> represents the array of data in the sample.

\<emph\>Value\</emph\> represents the value whose percentile rank must be determined.

Significance An optional argument that specifies the number of significant digits that the returned percentage value is rounded to.

#### Example

=PERCENTRANK(A1:A50; 50) returns the percentage rank of the value 50 from the total range of all values found in A1:A50. If 50 falls outside the total range, an error message will appear.

\<bookmark_value\>PHI function\</bookmark_value\>

## PHI

Returns the values of the distribution function for a standard normal distribution.

#### Syntax

PHI(Number)

\<emph\>Number\</emph\> represents the value based on which the standard normal distribution is calculated.

#### Example

PHI(2.25) = 0.03

PHI(-2.25) = 0.03

PHI(0) = 0.4

\<bookmark_value\>POISSON function\</bookmark_value\>

## POISSON

Returns the Poisson distribution.

#### Syntax

POISSON(Number; Mean [; C])

\<emph\>Number\</emph\> represents the value based on which the Poisson distribution is calculated.

\<emph\>Mean\</emph\> represents the middle value of the Poisson distribution.

\<emph\>C\</emph\> = 0 calculates the density function; \<emph\>C\</emph\> = 1 calculates the distribution.

#### Example

=POISSON(60;50;1) returns 0.93.

\<bookmark_value\>POISSON function\</bookmark_value\>

## POISSON.DIST

Returns the Poisson distribution. This function is available since LibreOffice 4.2.

#### Syntax

POISSON.DIST(Number; Mean ; Cumulative)

\<emph\>Number\</emph\> represents the value based on which the Poisson distribution is calculated.

\<emph\>Mean\</emph\> represents the middle value of the Poisson distribution.

Cumulative = 0 or False to calculate the probability mass function; Cumulative = 1, True, or any other non-zero value to calculate the cumulative distribution function.

#### Example

=POISSON(60;50;1) returns 0.93.

\<bookmark_value\>QUARTILE function\</bookmark_value\>

## QUARTILE

Returns the quartile of a data set.

#### Syntax

QUARTILE(Data; Type)

\<emph\>Data\</emph\> represents the array of data in the sample.

\<emph\>Type\</emph\> represents the type of quartile. (0 = MIN, 1 = 25%, 2 = 50% (MEDIAN), 3 = 75% and 4 = MAX.) This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.

#### Example

=QUARTILE(A1:A50; 2) returns the value of which 50% of the scale corresponds to the lowest to highest values in the range A1:A50.

\<bookmark_value\>QUARTILE function\</bookmark_value\>

## QUARTILE.EXC

Returns a requested quartile of a supplied range of values, based on a percentile range of 0 to 1 exclusive. The difference between QUARTILE.INC 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. This function is available since LibreOffice 4.3.

#### Syntax

QUARTILE(Data; Type)

Data represents the range of data values for which you want to calculate the specified quartile.

Type An integer between 1 and 3, representing the required quartile. (if type = 1 or 3, the supplied array must contain more than 2 values)

#### Example

=QUARTILE(A1:A50; 2) returns the value of which 50% of the scale corresponds to the lowest to highest values in the range A1:A50.

\<bookmark_value\>QUARTILE function\</bookmark_value\>

## QUARTILE.INC

Returns the quartile of a data set. The difference between QUARTILE.INC 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. This function is available since LibreOffice 4.3.

#### Syntax

QUARTILE(Data; Type)

\<emph\>Data\</emph\> represents the array of data in the sample.

\<emph\>Type\</emph\> represents the type of quartile. (0 = MIN, 1 = 25%, 2 = 50% (MEDIAN), 3 = 75% and 4 = MAX.)

#### Example

=QUARTILE(A1:A50; 2) returns the value of which 50% of the scale corresponds to the lowest to highest values in the range A1:A50.