返回超几何分布。 如果已知样本量、总体成功次数和总体大小,HypGeom_Dist 返回样本取得已知成功次数的概率。 HypGeom_Dist用于具有有限总体的问题,在该有限总体中,每次观察结果要么是成功,要么是失败,并且给定样本量的每个子集的选取是等可能的。
语法
表达式。HypGeom_Dist (arg1, arg2, arg3, arg4, arg5)
表达式 表示 WorksheetFunction 对象的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 说明 |
|---|---|---|---|
| Arg1 | 必需 | Double | sample_s - 样本中成功的次数。 |
| Arg2 | 必需 | Double | number_sample - 样本的大小。 |
| Arg3 | 必需 | Double | population_s - 总体中成功的次数。 |
| Arg4 | 必需 | Double | number_population - 总体大小。 |
| Arg5 | 可选 | Variant | cumulative - 一个决定函数形式的逻辑值。 如果 cumulative 为 True,则 HypGeom_Dist 返回累积分布函数;如果 为 False,则返回概率密度函数。 |
返回值
Double
备注
所有参数都将被截尾取整。
如果任一参数为非数值型, 则 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! 。
超几何分布的公式如下,其中:
- x = sample_s
- n = number_sample
- M = population_s
- N = number_population
HypGeom_Dist 用于有限总体中的不放回抽样。
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。