pdfGenPareto#
Purpose#
Computes the probability density function for the Generalized Pareto distribution.
Format#
- y = pdfGenPareto(x, a, sigma, k)#
- Parameters:
x (NxK matrix, Nx1 vector or scalar.) – data
a (NxK matrix, Nx1 vector or scalar) – Location parameter, ExE conformable with x.
sigma (NxK matrix, Nx1 vector or scalar) – Scale parameter, ExE conformable with x. sigma must be greater than 0.
k (NxK matrix, Nx1 vector or scalar) – Shape parameter, ExE conformable with x.
- Returns:
p (NxK matrix, Nx1 vector or scalar) – the probability density function for the Generalized Pareto distribution for the elements in x.
Remarks#
The probability density function for the Generalized Pareto distribution is defined as
\[\begin{split}f(x)= \begin{cases}
\frac{1}{\sigma}\big(1 + k
\frac{x-\mu}{\sigma} \big)^{-1 - 1/k},& k\neq 0\\
\frac{1}{\sigma}exp(\frac{x-\mu}{\sigma}), & k = 0
\end{cases}\end{split}\]
Examples#
// Data points
x = { 0.5, 1, 2, 3 };
// Generalized Pareto PDF with location = 0, scale = 1, shape = 0.5
p = pdfGenPareto(x, 0, 1, 0.5);
print p;
After the code above, p is equal to:
0.51200000
0.29629630
0.12500000
0.064000000
See also
Functions cdfGenPareto()