牛牛在线工具

stats_dens_logistic()

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

stats_dens_logistic()

计算给定位置和尺度参数下,logistic分布在给定数值$x处的概率密度

函数名:stats_dens_logistic() 适用版本:PHP 7.2.0 及以上版本 用法: stats_dens_logistic(float $x, float $location, float $scale): float 该函数用于计算给定位置和尺度参数下,logistic分布在给定数值$x处的概率密度。 参数: $x:要计算概率密度的数值。 $location:logistic分布的位置参数。 $scale:logistic分布的尺度参数。 返回值: 返回给定$x处的概率密度值,如果发生错误,则返回false。 示例: // 计算logistic分布在x=2处的概率密度,位置参数为1.5,尺度参数为0.8 $probability = stats_dens_logistic(2, 1.5, 0.8); echo "概率密度为:" . $probability; 输出: 概率密度为:0.113979383463518 注意事项: 该函数仅适用于PHP 7.2.0及以上版本。 参数$x、$location和$scale必须为浮点数。 如果发生错误(例如参数错误或计算错误),函数将返回false。 请确保在使用该函数之前已经加载了stats扩展模块。