函数名:stats_cdf_logistic()
适用版本:PHP 5 >= 5.3.0, PHP 7
函数说明:stats_cdf_logistic() 函数计算了累积分布函数 (CDF) 的 Logistic 分布。
用法: float stats_cdf_logistic ( float $par1 , float $par2 , float $par3 , int $which )
参数:
返回值:
示例:
// 计算 Logistic 分布的累积分布函数 (CDF) 的值
$location = 1.5;
$scale = 2.3;
$x = 2.1;
$cdf = stats_cdf_logistic($location, $scale, $x, 1);
echo "CDF: " . $cdf;
// 计算 Logistic 分布的逆累积分布函数 (inverse CDF) 的值
$location = 1.5;
$scale = 2.3;
$p = 0.7;
$inverse_cdf = stats_cdf_logistic($location, $scale, $p, 2);
echo "Inverse CDF: " . $inverse_cdf;
// 计算 Logistic 分布的概率密度函数 (PDF) 的值
$location = 1.5;
$scale = 2.3;
$x = 2.1;
$pdf = stats_cdf_logistic($location, $scale, $x, 3);
echo "PDF: " . $pdf;
注意:在以上示例中,$location 表示 Logistic 分布的位置参数,$scale 表示 Logistic 分布的尺度参数,$x 表示输入值,$p 表示概率值。根据不同的需求,通过设置 $which 参数的值来选择计算 CDF、逆 CDF 或 PDF 的值。