WorksheetFunction.HypGeom_Dist Excel) (方法

傳回超幾何分配。 HypGeom_Dist 會根據樣本大小、母體成功和母體大小,傳回指定樣本成功次數的機率。 針對有限母體的問題使用 HypGeom_Dist ,其中每個觀察結果都是成功或失敗,而指定大小的每個子集都以相等的可能性選擇。

語法

運算式HypGeom_Dist (Arg1Arg2Arg3Arg4Arg5)

表達 代表 WorksheetFunction 物件的 變數。

參數

名稱 必要/選用 資料類型 描述
Arg1 必要 雙精確度 Sample_s - 樣本成功數。
Arg2 必要 雙精確度 Number_sample - 樣本大小。
Arg3 必要 雙精確度 Population_s - 母體成功數。
Arg4 必要 雙精確度 Number_population - 母體大小。
Arg5 選用 Variant Cumulative - 決定函數形式的邏輯值。 如果 cumulative 為 TrueHypGeom_Dist 會傳回累加分配函數;如果 為 False,則會傳回機率品質函數。

傳回值

雙精確度

註解

會將所有引數無條件捨去成整數。

如果有任何非數值引數, HypGeom_Dist 會傳回#VALUE! 錯誤值。

如果 sample_s < 0 或 sample_s 大於小於number_sample或population_s, HypGeom_Dist 會傳回#NUM! 錯誤值。

如果 sample_s 小於 0 或 (number_sample 的大小 - number_population + population_s) , HypGeom_Dist 會傳回#NUM! 錯誤值。

如果number_sample ≤ 0 或number_sample > number_population, HypGeom_Dist 會傳回#NUM! 錯誤值。

如果population_s ≤ 0 或population_s > number_population,HypGeom_Dist會傳回 #NUM ! 錯誤值。

如果number_population ≤ 0, HypGeom_Dist會 傳回#NUM! 錯誤值。

超geometric 分佈的方程式如下所示,其中:

  • x = sample_s
  • n = number_sample
  • M = population_s
  • N = number_population

公式

HypGeom_Dist 用於取樣,而不會取代有限的母體擴展。

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應