public class GeneralizedExtremeValueDistribution extends Object implements ProbabilityDistribution<Double>
This distribution has location parameter $\mu$, shape parameter $\xi$ and scale parameter $\sigma$, with $$ \begin{align*} \mu&\in\Re,\\ \xi&\in\Re,\\ \sigma&>0 \end{align*} $$ and support $$ \begin{align*} x\in \begin{cases} \left[\mu - \frac{\sigma}{\xi}, +\infty\right) & \text{when } \xi > 0\\ (-\infty,+\infty) & \text{when } \xi = 0\\\\ \left(-\infty, \mu - \frac{\sigma}{\xi}\right] & \text{when } \xi < 0 \end{cases} \end{align*} $$ The cdf is given by: $$ \begin{align*} F(x) &=e^{-t(x)}\\ t(x)&= \begin{cases} \left(1 + \xi\frac{x-\mu}{\sigma}\right)^{-\frac{1}{\xi}} & \text{if } \xi \neq 0,\\ e^{-\frac{x-\mu}{\sigma}} & \text{if } \xi = 0. \end{cases} \end{align*} $$ and the pdf by: $$ \begin{align*} f(x)&=\frac{t(x)^{\xi + 1}e^{-t(x)}}{\sigma}\quad\\ t(x)&= \begin{cases} \left(1 + \xi\frac{x-\mu}{\sigma}\right)^{-\frac{1}{\xi}} & \text{if } \xi \neq 0,\\ e^{-\frac{x-\mu}{\sigma}} & \text{if } \xi = 0. \end{cases} \end{align*} $$
| Constructor and Description |
|---|
GeneralizedExtremeValueDistribution(double mu,
double sigma,
double ksi)
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 GeneralizedExtremeValueDistribution(double mu,
double sigma,
double ksi)
mu - The location parametersigma - The scale parameter, not negative or zeroksi - The shape parameterpublic 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>UnsupportedOperationException - alwayspublic double getMu()
public double getSigma()
public double getKsi()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.