Double GenParetoPDF(Double x, Double k, Double Mu, Double sigma)
Generalized Pareto (GPD) probability density function (PDF).
| # | Name | Description |
|---|---|---|
| 1 | x | Distribution domain, real value |
| 2 | if k >= 0 valid on (Mu, +Inf), if k < 0 valid when 0 <= (x-Mu)/sigma <= -1/k. | |
| 3 | k | Distribution shape parameter, real value. |
| 4 | Mu | Distribution location parameter, real value. |
| 5 | sigma | Distribution scale parameter, positive real value (sigma>0). |
Returns: Double - the Generalized Pareto PDF for value x using shape k, location Mu and positive scale sigma. Returns NaN if sigma<=0, or (for k<0) if 1+k(x-Mu)/sigma<=0.
Remarks:
Calculates the Generalized Pareto density. With z=(x-mu)/sigma,
PDF(x | k,mu,sigma) = { 1/sigma(1+k z)^(-(1/k+1)), if k != 0
{ [1.2ex] 1/sigmaexp[-z], if k=0 , z=(x-mu)/sigma .
This shape convention matches scipy.stats genpareto with c=k. Returns NaN for sigma<=0, or when 1+k z <= 0 for k < 0.