牛牛在线工具

stats_rand_gen_noncentral_t()

收录 8868 个 PHP 函数,含用途说明与用法示例。

stats_rand_gen_noncentral_t()

生成一个非中心 t 分布的随机变量

函数:stats_rand_gen_noncentral_t() 适用版本:PHP 7.4.0+ 用法:stats_rand_gen_noncentral_t(float $df, float $x, float $nc) 该函数用于生成一个非中心 t 分布的随机变量。 参数: $df:自由度(必需)- 定义 t 分布的自由度。必须大于 0。 $x:指定的值(必需)- 用于计算非中心 t 分布的概率密度函数。 $nc:非中心参数(必需)- 定义非中心 t 分布的非中心参数。 返回值:返回一个随机的非中心 t 分布的变量。 示例: $df = 10; $x = 2.5; $nc = 1.5; $randomVariable = stats_rand_gen_noncentral_t($df, $x, $nc); echo "随机的非中心 t 分布的变量为:" . $randomVariable; 输出: 随机的非中心 t 分布的变量为:2.124019811 注意:为了使用该函数,需要安装统计扩展(Stats PECL)。