统计函数第四部分

[text/scalc/01/func_averageif.xhp#averageif_head not found].

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.

[text/scalc/01/func_averageifs.xhp#averageifs_head not found].

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.

AVEDEV

返回一组数据点到其算术平均值的绝对偏差的平均值。由此体现一个数据集的离散状况。

语法

AVEDEV(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are values or ranges that represent a sample. Each number can also be replaced by a reference.

示例

=AVEDEV(A1:A50)

AVERAGE

返回参数的平均值。

语法

AVERAGE(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

示例

=AVERAGE(A1:A50)

AVERAGEA

返回自变量平均值。文本的值为 0。

语法

AVERAGEA(Value1; Value2; ...; Value30)

Value1, Value2, ..., Value30 are values or ranges. Text has the value of 0.

示例

=AVERAGEA(A1:A50)

MAX

返回参数列表中的最大值。

如果作为单元格引用传递的单元格区域没有数字值而且没有错误出现,返回 0。MIN() 和 MAX() 忽略含有文字的单元格。如果没有值(数字的或文字的)而且没有错误出现,函数 MINA() 和 MAXA() 返回 0。为 MIN() 或 MAX() 传递一个字符串参数,例如,MIN("string"),仍然产生错误。

语法

MAX(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

示例

=MAX(A1;A2;A3;50;100;200) 返回该列表中的最大值。

=MAX(A1:B100) 返回该列表中的最大值。

MAXA

返回参数列表中的最大值。与 MAX 函数不同的是,您可以输入文字,输入的文字将被视为零。

如果没有值(数字的或文字的)而且没有错误出现,函数 MINA() 和 MAXA() 返回 0。

语法

MAXA(Value1; Value2; ...; Value30)

Value1; Value2;...; Value30 are values or ranges. Text has the value of 0.

示例

=MAXA(A1;A2;A3;50;100;200;"Text") 返回该列表中的最大值。

=MAXA(A1:B100) 返回该列表中的最大值。

MEDIAN

返回给定的数值集合的中值。参数集合的数字个数为奇数时,中值为居于参数集合中间的数。当数字个数为偶数时,中值为居于中间的两个数的平均值。

语法

MEDIAN(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are values or ranges, which represent a sample. Each number can also be replaced by a reference.

示例

对于奇数:=MEDIAN(1;5;9;20;21) 返回 9 作为中值。

对于偶数 =MEDIAN(1;5;9;20) 返回中间两个数字的平均值,即 5 和 9 的平均值,也就是 7。

MIN

返回自变量列表中的最小值。

如果作为单元格引用传递的单元格区域没有数字值而且没有错误出现,返回 0。MIN() 和 MAX() 忽略含有文字的单元格。如果没有值(数字的或文字的)而且没有错误出现,函数 MINA() 和 MAXA() 返回 0。为 MIN() 或 MAX() 传递一个字符串参数,例如,MIN("string"),仍然产生错误。

语法

MIN(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

示例

=MIN(A1:B100) 返回该列表中的最小值。

MINA

返回自变量列表中的最小值。也可在此输入文本。文本值为 0。

如果没有值(数字的或文字的)而且没有错误出现,函数 MINA() 和 MAXA() 返回 0。

语法

MINA(Value1; Value2; ...; Value30)

Value1, Value2, ..., Value30 are values or ranges. Text has the value of 0.

示例

=MINA(1;"Text";20) 返回 0。

=MINA(A1:B100) 返回该列表中的最小值。

MODE

返回数组中出现频率最高的数值。如果有多个值出现次数相同,便给出其中最小的数值。如果一个数值没有出现两次,则报错。

批注图标

This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)


语法

MODE(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

示例

=MODE(A1:A50)

MODE.MULT

Returns a vertical array of the statistical modes (the most frequently occurring values) within a list of supplied numbers.

语法

MODE.MULT(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

警告图标

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.


示例

=MODE.MULT(A1:A50)

MODE.SNGL

返回数组中出现频率最高的数值。如果有多个值出现次数相同,便给出其中最小的数值。如果一个数值没有出现两次,则报错。

语法

MODE.SNGL(Number1; Number2; ...; Number30)

Number1, Number2, ..., Number30 are numerical values or ranges.

警告图标

If the data set contains no duplicate data points, MODE.SNGL returns the #VALUE! error value.


示例

=MODE.SNGL(A1:A50)

NEGBINOM.DIST

返回负二项式分布函数值。

语法

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

X 表示失败测试的返回值。

R 表示成功测试的返回值。

SP 是尝试成功的概率。

Cumulative(可选)= 0 计算密度函数,Cumulative = 1 计算分布。

示例

=NEGBINOM.DIST(1,1,0.5,0) 返回 0.25.

=NEGBINOM.DIST(1,1,0.5,1) 返回 0.75.

NEGBINOMDIST

返回负二项式分布函数值。

语法

NEGBINOMDIST(X; R; SP)

X 表示失败测试的返回值。

R 表示成功测试的返回值。

SP 是尝试成功的概率。

示例

=NEGBINOMDIST(1;1;0.5) 返回 0.25。

NORM.DIST

返回密度函数或标准正态分布函数。

语法

NORM.DIST(Number, Mean, StDev, C)

Number 是用于计算正态分布的分布值。

Mean 是分布的平均值。

StDev 是正态分布的标准差。

C 是可选的。C = 0 计算密度函数,C = 1 计算分布。

示例

=NORM.DIST(70,63,5,0) 返回 0.029945493.

=NORM.DIST(70,63,5,1) 返回 0.9192433408.

NORM.INV

返回标准正态分布函数的逆函数。

语法

NORM.INV(Number, Mean, StDev)

Number 表示用于计算正态分布逆函数的概率值。

Mean 表示正态分布的平均值。

StDev 表示正态分布的标准偏差。

示例

=NORMINV(0.9;63;5) 返回 69.41。如果鸡蛋的平均重量为 63 克,标准偏差为 5,则鸡蛋不超过 69.41 克的概率为 90%。

NORMDIST

返回密度函数或标准正态分布函数。

语法

NORMDIST(Number; Mean; StDev; C)

Number 是用于计算正态分布的分布值。

Mean 是分布的平均值。

StDev 是正态分布的标准差。

C 是可选的。C = 0 计算密度函数,C = 1 计算分布。

示例

=NORMDIST(70;63;5;0) 返回 0.03。

=NORMDIST(70;63;5;1) 返回 0.92。

NORMINV

返回标准正态分布函数的逆函数。

语法

NORMINV(Number; Mean; StDev)

Number 表示用于计算正态分布逆函数的概率值。

Mean 表示正态分布的平均值。

StDev 表示正态分布的标准偏差。

示例

=NORMINV(0.9;63;5) 返回 69.41。如果鸡蛋的平均重量为 63 克,标准偏差为 5,则鸡蛋不超过 69.41 克的概率为 90%。

PEARSON

返回 Pearson 乘积矩相关系数 r。

语法

PEARSON(Data1; Data2)

Data1 表示第一个数据集的数组。

Data2 表示第二个数据集的数组。

示例

=PEARSON(A1:A30;B1:B30) 返回两个数据集的 Pearson 相关系数。

PERCENTILE

返回数组中数值的 alpha 百分点。此百分点返回数据序列最小值 (Alpha = 0),最大值 (alpha = 1) 的刻度值。Alpha = 25% 表示第一个四分位数;Alpha = 50% 为 MEDIAN。

语法

PERCENTILE(Data; Alpha)

Data 表示数据的数组。

Alpha 表示 0 到 1 之间的刻度百分比。

示例

=PERCENTILE(A1:A50;0.1) 表示数据集中的值,即等于 A1:A50 中的整个数据刻度的 10%。

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 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.


语法

PERCENTILE.EXC(Data, Alpha)

Data 表示数据的数组。

Alpha 表示 0 到 1 之间的刻度百分比。

示例

=PERCENTILE(A1:A50;0.1) 表示数据集中的值,即等于 A1:A50 中的整个数据刻度的 10%。

PERCENTILE.INC

返回数组中数值的 alpha 百分点。此百分点返回数据序列最小值 (Alpha = 0),最大值 (alpha = 1) 的刻度值。Alpha = 25% 表示第一个四分位数;Alpha = 50% 为 MEDIAN。

批注图标

The difference between PERCENTILE.INC and PERCENTILE.EXC is that, in the PERCENTILE.INC function the value of alpha is 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.


语法

PERCENTILE.INC(Data, Alpha)

Data 表示数据的数组。

Alpha 表示 0 到 1 之间的刻度百分比。

示例

=PERCENTILE(A1:A50;0.1) 表示数据集中的值,即等于 A1:A50 中的整个数据刻度的 10%。

PERCENTRANK

返回一个数值在抽样中所占的百分比排位。

语法

PERCENTRANK(Data; Value; Significance)

array 表示抽样中的数据数组。

Value 是要确定其百分比排位的数值。

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.

示例

=PERCENTRANK(A1:A50;50) 返回数值 50 在 A1:A50 区域所有数值中的百分比排位。如果 50 不在该单元格区域内,则显示错误消息。

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.


语法

PERCENTRANK.EXC(Data; Value; Significance)

array 表示抽样中的数据数组。

Value 是要确定其百分比排位的数值。

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

示例

=PERCENTRANK(A1:A50;50) 返回数值 50 在 A1:A50 区域所有数值中的百分比排位。如果 50 不在该单元格区域内,则显示错误消息。

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.


语法

PERCENTRANK.INC(Data; Value; Significance)

array 表示抽样中的数据数组。

Value 是要确定其百分比排位的数值。

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

示例

=PERCENTRANK(A1:A50;50) 返回数值 50 在 A1:A50 区域所有数值中的百分比排位。如果 50 不在该单元格区域内,则显示错误消息。

PHI

计算标准正态分布的分布函数值。

语法

PHI(number)

Number 是用于计算标准正态分布的数值。

示例

=PHI(2.25) = 0.03

=PHI(-2.25) = 0.03

=PHI(0) = 0.4

POISSON

返回泊松分布的函数值。

语法

POISSON(Number; Mean; C)

Number 是用于计算泊松分布的数值。

Mean 表示泊松分布的平均值。

C(可选)= 0 或 False 计算密度函数;C = 1 或 True 计算分布。如果忽略,将在您保存文档时插入默认值 True,这是为了最好地兼容其他程序或 LibreOffice 的早期版本。

示例

=POISSON(60;50;1) 返回 0.93。

POISSON.DIST

返回泊松分布的函数值。

语法

POISSON.DIST(Number, Mean, C)

Number 是用于计算泊松分布的数值。

Mean 表示泊松分布的平均值。

C(可选)= 0 或 False 计算密度函数;C = 1 或 True 计算分布。如果忽略,将在您保存文档时插入默认值 True,这是为了最好地兼容其他程序或 LibreOffice 的早期版本。

示例

=POISSON.DIST(60,50,1) 返回 0.9278398202.

QUARTILE

返回数据集的分位数。

语法

QUARTILE(array; type)

array 表示抽样中的数据数组。

Type 是四分位的类型。(0 = 最小数值,1 = 25%,2 = 50%(中间值),3 = 75%,4 = 最大值。)

示例

=QUARTILE(A1:A50;2) 返回 A1:A50 区域内从小到大排列的数据中刻度为 50% 处的数值。

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.


语法

QUARTILE.EXC(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)

示例

=QUARTILE(A1:A50;2) 返回 A1:A50 区域内从小到大排列的数据中刻度为 50% 处的数值。

QUARTILE.INC

返回数据集的分位数。

批注图标

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.


语法

QUARTILE.INC(Data, Type)

array 表示抽样中的数据数组。

Type 是四分位的类型。(0 = 最小数值,1 = 25%,2 = 50%(中间值),3 = 75%,4 = 最大值。)

示例

=QUARTILE(A1:A50;2) 返回 A1:A50 区域内从小到大排列的数据中刻度为 50% 处的数值。