public class GeneralizedParetoDistribution extends Object implements ProbabilityDistribution<Double>
The generalized Pareto distribution is a family of power law probability distributions with location parameter $\mu$, shape parameter $\xi$ and scale parameter $\sigma$, where $$ \begin{eqnarray*} \mu&\in&\Re,\\ \xi&\in&\Re,\\ \sigma&>&0 \end{eqnarray*} $$ and with support $$ \begin{eqnarray*} x\geq\mu\quad\quad\quad(\xi\geq 0)\\ \mu\leq x\leq\mu-\frac{\sigma}{\xi}\quad(\xi<0) \end{eqnarray*} $$ The cdf is given by: $$ \begin{align*} F(z)&=1-\left(1 + \xi z\right)^{-\frac{1}{\xi}}\\ z&=\frac{x-\mu}{\sigma} \end{align*} $$ and the pdf is given by: $$ \begin{align*} f(z)&=\frac{\left(1+\xi z\right)^{-\left(\frac{1}{\xi} + 1\right)}}{\sigma}\\ z&=\frac{x-\mu}{\sigma} \end{align*} $$ Given a uniform random number variable $U$ drawn from the interval $(0,1]$, a Pareto-distributed random variable with parameters $\mu$, $\sigma$ and $\xi$ is given by $$ \begin{align*} X=\mu + \frac{\sigma\left(U^{-\xi}-1\right)}{\xi}\sim GPD(\mu,\sigma,\xi) \end{align*} $$
| Constructor and Description |
|---|
GeneralizedParetoDistribution(double mu,
double sigma,
double ksi)
Creates an instance.
|
GeneralizedParetoDistribution(double mu,
double sigma,
double ksi,
RandomEngine engine)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getCDF(Double x)
Returns the cumulative distribution function for a value
|
double |
getInverseCDF(Double p)
Given a probability, return the value that returns this cdf
|
double |
getKsi()
Gets the shape parameter.
|
double |
getMu()
Gets the location parameter.
|
double |
getPDF(Double x)
Return the probability density function for a value
|
double |
getSigma()
Gets the scale parameter.
|
int |
hashCode() |
double |
nextRandom() |
public GeneralizedParetoDistribution(double mu,
double sigma,
double ksi)
mu - The location parametersigma - The scale parameter, not negative or zeroksi - The shape parameter, not zeropublic GeneralizedParetoDistribution(double mu,
double sigma,
double ksi,
RandomEngine engine)
mu - The location parametersigma - The scale parameterksi - The shape parameterengine - A uniform random number generator, not nullpublic double getMu()
public double getSigma()
public double getKsi()
public double getCDF(Double x)
getCDF in interface ProbabilityDistribution<Double>x - The value, not nullIllegalArgumentException - If $x \not\in$ supportpublic double getInverseCDF(Double p)
getInverseCDF in interface ProbabilityDistribution<Double>p - The probability, not null. $0 \geq p \geq 1$UnsupportedOperationException - alwayspublic double getPDF(Double x)
getPDF in interface ProbabilityDistribution<Double>x - The value, not nullIllegalArgumentException - If $x \not\in$ supportpublic double nextRandom()
nextRandom in interface ProbabilityDistribution<Double>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.