統計函式第一部分

COUNTIFS

Returns the count of cells that meet criteria in multiple ranges.

B

傳回具有二項式分佈的範例之概率。

Syntax

B(Trials; SP; T1 [; T2])

Trials 是指獨立試驗的次數。

SP 是每次試驗的成功機率。

T1 會定義試驗次數的下限。

T2 (選擇性) 定義試驗次數的上限。

Example

在 10 次骰子的投擲中,剛好有二次六的概率多高?出現一個六 (或其他點數) 的概率為 1/6,得出公式如下:

=B(10;1/6;2) 傳回機率 29%。

BETADIST

傳回 beta 函式。

Syntax

BETADIST(Number; Alpha; Beta [; Start [; End [; Cumulative]]])

Number 是指介於 StartEnd 之間用以計算函式的值。

Alpha 為分佈的參數。

Beta 為分佈的參數。

Start (選擇性) 是指 Number 的下限。

End (選擇性) 是指 Number 的上限。

Cumulative (選擇性) 可為 0 或 False 以計算機率密度函式。它可以是任何其他值或 True,或加以省略以計算累積分佈函式。

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

Example

=BETADIST(0.75;3;4) returns the value 0.96.

BETADIST

傳回 beta 函式。

tip

This function is available since LibreOffice 4.2.


Syntax

BETA.DIST(Number; Alpha; Beta; Cumulative [; Start [; End]])

Number 是指介於 StartEnd 之間用以計算函式的值。

Alpha 為分佈的參數。

Beta 為分佈的參數。

Cumulative (選擇性) 可為 0 或 False 以計算機率密度函式。它可以是任何其他值或 True,或加以省略以計算累積分佈函式。

Start (選擇性) 是指 Number 的下限。

End (選擇性) 是指 Number 的上限。

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

Example

=BETADIST(0.75;3;4) 傳回值 0.96。

=BETADIST(0.75;3;4) 傳回值 0.96。

Technical information

This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.BETA.DIST

BETAINV

Returns the inverse of the cumulative Beta probability density function.

Syntax

BETAINV(Number; Alpha; Beta [; Start [; End]])

Number is the probability associated with the Beta distribution for the given arguments Alpha and Beta.

Alpha is a strictly positive parameter of the Beta distribution.

Beta is a strictly positive parameter of the Beta distribution.

Start (optional) is the lower bound of the output range of the function. If omitted, the default value is 0.

End (optional) is the upper bound of the output range of the function. If omitted, the default value is 1.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

Example

=BETAINV(0.5;5;10) returns the value 0.3257511553.

BETAINV Wiki page

BETAINV

Returns the inverse of the cumulative Beta probability density function.

Syntax

BETA.INV(Number; Alpha; Beta [; Start [; End]])

Number is the probability associated with the Beta distribution for the given arguments Alpha and Beta.

Alpha is a strictly positive parameter of the Beta distribution.

Beta is a strictly positive parameter of the Beta distribution.

Start (optional) is the lower bound of the output range of the function. If omitted, the default value is 0.

End (optional) is the upper bound of the output range of the function. If omitted, the default value is 1.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

Example

=BETA.INV(0.5;5;10) returns the value 0.3257511553.

BETA.INV Wiki page

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.BETA.INV

BINOM.INV

Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value.

Syntax

BINOM.INV(Trials; SP; Alpha)

N 為試驗的總數。

SP 是每次試驗的成功機率。

Alpha The border probability that is attained or exceeded.

Example

=BINOM.INV(8;0.6;0.9) returns 7, the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value.

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.BINOM.INV

BINOMDIST

傳回個別項二項式分佈概率。

Syntax

BINOMDIST(X; Trials; SP; C)

X 為試驗集中成功的數目。

Trials 是指獨立試驗的次數。

SP 是每次試驗的成功機率。

C = 0 計算單一事件機率;C = 1 計算累積機率。

Example

=BINOMDIST(A1;12;0.5;0) 顯示 (若在 A1 中輸入值 012) 投擲 12 次硬幣當中,出現人像的次數與 A1 中輸入的次數完全相同的機率。

=BINOMDIST(A1;12;0.5;1) 顯示相同序列的累積機率。例如,若 A1 = 4,序列的累積機率為 0、1、2、3 或 4 次人像 (非獨佔式 OR)。

BINOMDIST

傳回個別項二項式分佈概率。

Syntax

BINOMDIST(X; Trials; SP; C)

X 為試驗集中成功的數目。

Trials 是指獨立試驗的次數。

SP 是每次試驗的成功機率。

C = 0 計算單一事件機率;C = 1 計算累積機率。

Example

=BINOMDIST(A1;12;0.5;0) 顯示 (若在 A1 中輸入值 012) 投擲 12 次硬幣當中,出現人像的次數與 A1 中輸入的次數完全相同的機率。

=BINOMDIST(A1;12;0.5;1) 顯示相同序列的累積機率。例如,若 A1 = 4,序列的累積機率為 0、1、2、3 或 4 次人像 (非獨佔式 OR)。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.BINOM.DIST

CHIDIST

從假設已確認的指示卡方中傳回概率值。 CHIDIST 比較要提供給隨機範例的卡方值,平方範例是以 (觀察值-預期值)^2/具有理論卡方分佈的所有值之預期值的小計計算出來,並由此決定要測試的假設之錯誤概率。

透過 CHIDIST 計算的概率也可以透過 CHITEST 決定,在此必須以觀察和期望資料而不是抽樣的 chi 正方形作為參數輸入。

Syntax

CHIDIST(Number; DegreesFreedom)

Number 是指用以決定誤差機率的隨機取樣之卡方值。

DegreesFreedom 是指實驗的自由度。

Example

=CHIDIST(13.27; 5) 等於 0.02。

抽樣的 chi 正方形數值總計為 13.27,而實驗的 degrees_freedom 為 5,因此誤差概率假設值確定在 2%。

CHIINV

傳回卡方分佈的一尾概率逆運算。

Syntax

CHIINV(Number; DegreesFreedom)

Number 是指誤差機率值。

DegreesFreedom 是指實驗的自由度。

Example

投擲一個骰子1020 次。點數 1 到 6 各出現 195、151、148、189、183 和 154 次 (觀察值)。需檢查這個骰子是否為真的假設。

抽樣的卡方分配分佈會由上述的公式算出。因為 n 個骰子在投擲了 n 次後的期望值數字為 1/6,即 1020/6=170,該公式便會得出一個為 13.27 的 chi 正方形數值。

若 (所觀察的) chi 正方形大於或是等於 (理論上的) chi 正方形 CHIINV,則就可以不用考慮這個假設,因為理論和實驗值的偏差過大。若所觀察的 chi 正方形小於 CHIINV,則含指定誤差概率的假設就成立。

=CHIINV(0.05;5) 傳回 11.07。

=CHIINV(0.02;5) 傳回 13.39。

誤差概率若為 5% 代表骰子不為真,若為 2% 就沒有必要去懷疑它的真實度了。

CHISQDIST

傳回基於獨立的卡方測試的兩個測試排列之隨機分佈的偏差概率。 CHITEST 傳回資料的卡方分佈。

經由 CHITEST 計算的概率也可以利用 CHIDIST 決定,在此,必須以抽樣的 chi 正方形而不是資料組作為參數輸入。

Syntax

CHITEST(DataB; DataE)

DataB 是指觀察值的陣列。

DataE 是指預期值的範圍。

Example

A (觀察)

B (期望)

1

195

170

2

151

170

3

148

170

4

189

170

5

183

170

6

154

170


=CHITEST(A1:A6;B1:B6) 等於 0.02。此為可滿足理論式卡方分佈的觀察資料之機率。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.CHISQ.TEST

CHISQDIST

為卡方分佈傳回機率密度函式的值或累積分佈函式。

Syntax

CHISQDIST(Number; Degrees Of Freedom; Cumulative)

Number 是指用以決定誤差機率的隨機取樣之卡方值。

DegreesFreedom 是指實驗的自由度。

Cumulative (選擇性) 可為 0 或 False 以計算機率密度函式。它可以是任何其他值或 True,或加以省略以計算累積分佈函式。

Example

=CHISQ.DIST(3; 2; 0) equals 0.1115650801, the probability density function with 2 degrees of freedom, at x = 3.

=CHISQ.DIST(3; 2; 1) equals 0.7768698399, the cumulative chi-square distribution with 2 degrees of freedom, at the value x = 3.

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.CHISQ.DIST

CHISQDIST

從假設已確認的指示卡方中傳回概率值。 CHIDIST 比較要提供給隨機範例的卡方值,平方範例是以 (觀察值-預期值)^2/具有理論卡方分佈的所有值之預期值的小計計算出來,並由此決定要測試的假設之錯誤概率。

透過 CHIDIST 計算的概率也可以透過 CHITEST 決定,在此必須以觀察和期望資料而不是抽樣的 chi 正方形作為參數輸入。

Syntax

CHIDIST(Number; DegreesFreedom)

Number 是指用以決定誤差機率的隨機取樣之卡方值。

DegreesFreedom 是指實驗的自由度。

Example

=CHIDIST(13.27; 5) 等於 0.02。

抽樣的 chi 正方形數值總計為 13.27,而實驗的 degrees_freedom 為 5,因此誤差概率假設值確定在 2%。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.CHISQ.DIST.RT

CHISQDIST

為卡方分佈傳回機率密度函式的值或累積分佈函式。

Syntax

CHISQDIST(Number; Degrees Of Freedom [; Cumulative])

Number 是要計算其函式的數字。

Degrees Of Freedom 是指卡方函式的自由度數。

Cumulative (選擇性):0 或 False 會計算機率密度函式。其他值或 True 或省略則計算累積分佈函式。

CHISQINV

傳回 CHISQDIST 的倒數。

Syntax

CHISQINV(Probability; Degrees of Freedom)

Probability 是指要計算其卡方分佈逆運算的機率值。

Degrees Of Freedom 是指卡方函式的自由度數。

CHISQINV

傳回卡方分佈的一尾概率逆運算。

Syntax

CHISQ.INV(Probability; DegreesFreedom)

Probability 是指要計算其卡方分佈逆運算的機率值。

Degrees Of Freedom 是指卡方函式的自由度數。

Example

=CHIINV(0.05;5) 傳回 11.07。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.CHISQ.INV

CHISQINV

傳回卡方分佈的一尾概率逆運算。

Syntax

CHIINV(Number; DegreesFreedom)

Number 是指誤差機率值。

DegreesFreedom 是指實驗的自由度。

Example

投擲一個骰子1020 次。點數 1 到 6 各出現 195、151、148、189、183 和 154 次 (觀察值)。需檢查這個骰子是否為真的假設。

抽樣的卡方分配分佈會由上述的公式算出。因為 n 個骰子在投擲了 n 次後的期望值數字為 1/6,即 1020/6=170,該公式便會得出一個為 13.27 的 chi 正方形數值。

若 (所觀察的) chi 正方形大於或是等於 (理論上的) chi 正方形 CHIINV,則就可以不用考慮這個假設,因為理論和實驗值的偏差過大。若所觀察的 chi 正方形小於 CHIINV,則含指定誤差概率的假設就成立。

=CHIINV(0.05;5) 傳回 11.07。

=CHIINV(0.02;5) 傳回 13.39。

誤差概率若為 5% 代表骰子不為真,若為 2% 就沒有必要去懷疑它的真實度了。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.CHISQ.INV.RT

CHITEST

傳回基於獨立的卡方測試的兩個測試排列之隨機分佈的偏差概率。 CHITEST 傳回資料的卡方分佈。

經由 CHITEST 計算的概率也可以利用 CHIDIST 決定,在此,必須以抽樣的 chi 正方形而不是資料組作為參數輸入。

Syntax

CHITEST(DataB; DataE)

DataB 是指觀察值的陣列。

DataE 是指預期值的範圍。

Example

A (觀察)

B (期望)

1

195

170

2

151

170

3

148

170

4

189

170

5

183

170

6

154

170


=CHITEST(A1:A6;B1:B6) 等於 0.02。此為可滿足理論式卡方分佈的觀察資料之機率。

COUNT

計算引數清單中有多少個值。 忽略文字項目。

Syntax

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

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

note

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

將會計算在 Value 1-4 欄位中的 2、4、6 與 8 項目。

=COUNT(2;4;6;"eight") = 3。數字的計數結果為 3。

COUNTA

計算引數清單中數值的個數。 也會計算文字項目,即使它們包含的是長度為 0 的空字串。如果引數是一個陣列或參照,則會略過該陣列或參照內的空儲存格。

Syntax

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

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

Example

將會計算在 Value 1-4 欄位中的 2、4、6 與 8 項目。

=COUNTA(2;4;6;"eight") = 4。值的計數結果為 4。

COUNTBLANK

傳回空的儲存格數。

Syntax

COUNTBLANK(Range)

傳回儲存格範圍 Range 中空白的儲存格數。

Example

若儲存格 A1、A2、B1 與 B2 皆為空白,則 =COUNTBLANK(A1:B2) 會傳回 4。

COUNTIF

傳回某一儲存格範圍中符合一定條件的儲存格數。

Syntax

COUNTIF(Range; Criterion)

Range 是要套用條件的範圍。

Criterion: A criterion is a single cell Reference, Number or Text. It is used in comparisons with cell contents.

A reference to an empty cell is interpreted as the numeric value 0.

A matching expression can be:

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


Example

A1:A10 是包含數字 20002009 的儲存格範圍。儲存格 B1 包含數字 2006。在儲存格 B2 中,輸入公式:

=COUNTIF(A1:A10;2006) - this returns 1.

=COUNTIF(A1:A10;B1) - this returns 1.

=COUNTIF(A1:A10;">=2006") - this returns 4.

=COUNTIF(A1:A10;"<"&B1) - when B1 contains 2006, this returns 6.

=COUNTIF(A1:A10;C2) where cell C2 contains the text >2006 counts the number of cells in the range A1:A10 which are >2006.

僅計算負數:=COUNTIF(A1:A10;"<0")

EXPONDIST

傳回指數分佈。

Syntax

EXPONDIST(Number; Lambda; C)

Number 是指函式值。

Lambda 是指參數值。

C 是指決定函式表單的邏輯值。C = 0 會計算密度函式,C = 1 會計算分佈。

Example

=EXPONDIST(3;0.5;1) 傳回 0.78。

EXPONDIST

傳回指數分佈。

Syntax

EXPONDIST(Number; Lambda; C)

Number 是指函式值。

Lambda 是指參數值。

C 是指決定函式表單的邏輯值。C = 0 會計算密度函式,C = 1 會計算分佈。

Example

=EXPONDIST(3;0.5;1) 傳回 0.78。

Technical information

tip

This function is available since LibreOffice 4.2.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.EXPON.DIST

INTERCEPT

使用已知 x 值與 y 值計算會交叉 y 值線的點。

Syntax

INTERCEPT(DataY; DataX)

DataY 是指觀察值或資料的因變數組。

DataX 是指觀察值或資料的自變數值組。

此處必須使用包含數字的名稱、陣列或參照。也可以直接輸入數字。

Example

在軸區段的計算上會使用範例試算表上的儲存格 D3:D9 作為 Y 值,儲存格 C3:C9 作為 X 值。輸入值如下:

=INTERCEPT(D3:D9;C3:C9) = 2.15。

RSQ

傳回基於指定值 Pearson 相關係數的平方。 RSQ (也稱為決定係數) 是調整準確性的方法,可用產生回歸分析。

Syntax

RSQ(DataY; DataX)

DataY 是指資料點的陣列或範圍。

DataX 是指資料點的陣列或範圍。

Example

=RSQ(A1:A20;B1:B20) 計算欄 A 與欄 B 中兩個資料集的相關係數。

Please support us!