MathPHP\Probability\Distribution\Continuous\Exponential::PDF PHP Method

PDF() public static method

f(x;λ) = λℯ^⁻λx x ≥ 0 = 0 x < 0
public static PDF ( float $x, float ) : float
$x float the random variable
float often called the rate parameter
return float
    public static function PDF(float $x, float $λ) : float
    {
        if ($x < 0) {
            return 0;
        }
        Support::checkLimits(self::LIMITS, ['x' => $x, 'λ' => $λ]);
        return $λ * exp(-$λ * $x);
    }