MathCumulativeDistributionGeometric
MathCumulativeDistributionGeometric
通过p参数,计算随机变量x的几何定律下概率分布函数值。出错情况下它返回NaN。
double MathCumulativeDistributionGeometric(
const double x, // 随机变量值(整数)
const double p, // 分布参数 (每次测试中事件发生的概率)
const bool tail, // 计算标识,如果true,则计算不超过随机变量x的概率
const bool log_mode, // 计算数值对数的标识,如果log_mode=true,则计算概率的自然对数
int& error_code // 存储错误代码的变量
);通过p参数,计算随机变量x的几何定律下概率分布函数值。出错情况下它返回NaN。
double MathCumulativeDistributionGeometric(
const double x, // 随机变量值(整数)
const double p, // 分布参数 (每次测试中事件发生的概率)
int& error_code // 存储错误代码的变量
);通过p参数,计算随机变量数组x[]的几何定律下概率分布函数值。出错情况下它返回false。Analog of the pgeom() in R.
bool MathCumulativeDistributionGeometric(
const double& x[], // 随机变量值数组
const double p, // 分布参数 (每次测试中事件发生的概率)
const bool tail, // 计算标识,如果true,则计算不超过随机变量x的概率
const bool log_mode, //计算数值对数的标识,如果log_mode=true,则计算概率的自然对数
double& result[] // 概率函数值数组
);通过p参数,计算随机变量数组x[]的几何定律下概率分布函数值。出错情况下它返回false。
bool MathCumulativeDistributionGeometric(
const double& x[], // 随机变量值数组
const double p, // 分布参数 (每次测试中事件发生的概率)
double& result[] // 概率函数值数组
);参数
- x
[in] 随机变量值。
- x[]
[in] 随机变量值数组。
- p
[in] 分布参数 (每次测试中事件发生的概率)。
tail
[in] Flag of calculation, if tail=true, then the probability of random variable not exceeding x is calculated.
log_mode
[in] 计算数值对数的标识,如果log_mode=true,则计算概率的自然对数。
- error_code
[out] 存储错误代码的变量。
- result[]
[out] 概率函数值数组。