## Class GeneralizedExtremeValueDistribution

• java.lang.Object
• com.opengamma.strata.math.impl.statistics.distribution.GeneralizedExtremeValueDistribution
• All Implemented Interfaces:
ProbabilityDistribution<Double>

public class GeneralizedExtremeValueDistribution
extends Object
implements ProbabilityDistribution<Double>
The generalized extreme value distribution is a family of continuous probability distributions that combines the Gumbel (type I), Fréchet (type II) and Weibull (type III) families of distributions.

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 Summary

Constructors
Constructor Description
GeneralizedExtremeValueDistribution​(double mu, double sigma, double ksi)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method 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()
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### GeneralizedExtremeValueDistribution

public GeneralizedExtremeValueDistribution​(double mu,
double sigma,
double ksi)
Creates an instance.
Parameters:
mu - The location parameter
sigma - The scale parameter, not negative or zero
ksi - The shape parameter
• ### Method Detail

• #### getCDF

public double getCDF​(Double x)
Returns the cumulative distribution function for a value
Specified by:
getCDF in interface ProbabilityDistribution<Double>
Parameters:
x - The value, not null
Returns:
The cdf
Throws:
IllegalArgumentException - If $x \not\in$ support
• #### getInverseCDF

public double getInverseCDF​(Double p)
Given a probability, return the value that returns this cdf
Specified by:
getInverseCDF in interface ProbabilityDistribution<Double>
Parameters:
p - The probability, not null. $0 \geq p \geq 1$
Returns:
Not supported
Throws:
UnsupportedOperationException - always
• #### getPDF

public double getPDF​(Double x)
Return the probability density function for a value
Specified by:
getPDF in interface ProbabilityDistribution<Double>
Parameters:
x - The value, not null
Returns:
The pdf
Throws:
IllegalArgumentException - If $x \not\in$ support
• #### nextRandom

public double nextRandom()
Specified by:
nextRandom in interface ProbabilityDistribution<Double>
Returns:
Not supported
Throws:
UnsupportedOperationException - always
• #### getMu

public double getMu()
Gets the location parameter.
Returns:
The location parameter
• #### getSigma

public double getSigma()
Gets the scale parameter.
Returns:
The scale parameter
• #### getKsi

public double getKsi()
Gets the shape parameter.
Returns:
The shape parameter
• #### hashCode

public int hashCode()
Overrides:
hashCode in class Object
• #### equals

public boolean equals​(Object obj)
Overrides:
equals in class Object