public static function PDF($x, $μ, $σ) : float
{
Support::checkLimits(self::LIMITS, ['x' => $x, 'μ' => $μ, 'σ' => $σ]);
$π = \M_PI;
$σ√⟮2π⟯ = $σ * sqrt(2 * $π);
$⟮x − μ⟯²∕2σ² = pow($x - $μ, 2) / (2 * $σ ** 2);
$ℯ^−⟮x − μ⟯²∕2σ² = exp(-$⟮x − μ⟯²∕2σ²);
return 1 / $σ√⟮2π⟯ * $ℯ^−⟮x − μ⟯²∕2σ²;
}
/** * Probability density function * * @param number $z random variable * * @return float f(z|μ,σ) */ public static function PDF($z) { Support::checkLimits(self::LIMITS, ['z' => $z]); return Normal::PDF($z, self::μ, self::σ); }