WorksheetFunction.HypGeom_Dist 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回超几何分布。 如果已知样本量、总体成功次数和总体大小,HypGeom_Dist 返回样本取得已知成功次数的概率。 HypGeom_Dist用于具有有限总体的问题,在该有限总体中,每次观察结果要么是成功,要么是失败,并且给定样本量的每个子集的选取是等可能的。
public:
double HypGeom_Dist(double Arg1, double Arg2, double Arg3, double Arg4, bool Arg5);
public double HypGeom_Dist(double Arg1, double Arg2, double Arg3, double Arg4, bool Arg5);
Public Function HypGeom_Dist (Arg1 As Double, Arg2 As Double, Arg3 As Double, Arg4 As Double, Arg5 As Boolean) As Double
参数
- Arg1
- Double
sample_s - 样本中成功的次数。
- Arg2
- Double
number_sample - 样本的大小。
- Arg3
- Double
population_s - 总体中成功的次数。
- Arg4
- Double
number_population - 总体大小。
- Arg5
- Boolean
cumulative - 一个决定函数形式的逻辑值。 如果 cumulative 为 true,则 HypGeom_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! 。
超几何分布的公式为:
图 1:超几何分布的方程
其中:
x = sample_s
n = number_sample
M = population_s
N = number_population
HypGeom_Dist 用于有限总体中的不放回抽样。