Class GeneralizedEVD

java.lang.Object
dev.nm.stat.evt.evd.univariate.GeneralizedEVD
All Implemented Interfaces:
ProbabilityDistribution, UnivariateEVD
Direct Known Subclasses:
FrechetDistribution, GumbelDistribution, ReversedWeibullDistribution

public class GeneralizedEVD extends Object implements UnivariateEVD
Generalized extreme value (GEV) distribution is a family of continuous probability distributions developed within extreme value theory to combine the Gumbel, Fréchet and Weibull families also known as type I, II and III extreme value distributions. By the extreme value theorem the GEV distribution is the limit distribution of properly normalized maxima of a sequence of independent and identically distributed (IID) random variables.

The R equivalent functions are evd::dgev, evd::pgev, evd::qgev, evd::mtransform.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an instance of generalized extreme value distribution with the default parameter values: location \(\mu=0\), scale \(\sigma=1\), shape \(\xi=0\).
    GeneralizedEVD(double location, double scale, double shape)
    Create an instance of generalized extreme value distribution with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    cdf(double x)
    Gets the cumulative probability F(x) = Pr(X ≤ x).
    double
    density(double x)
    The density function, which, if exists, is the derivative of F.
    double
    Gets the entropy of this distribution.
    double
    Get the location parameter.
    double
    Get the scale parameter.
    double
    Get the shape parameter.
    double
    Gets the excess kurtosis of this distribution.
    double
    logDensity(double x)
    Get the logarithm of the probability density function at \(x\), that is, \(\log(f(x))\).
    double
    Inverse of marginal transform.
    double
    Transform to exponential margins under the GEV model.
    double
    Gets the mean of this distribution.
    double
    Gets the median of this distribution.
    double
    moment(double x)
    The moment generating function is the expected value of etX.
    double
    quantile(double p)
    Gets the quantile, the inverse of the cumulative distribution function.
    double
    Gets the skewness of this distribution.
    double
    Gets the variance of this distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GeneralizedEVD

      public GeneralizedEVD()
      Create an instance of generalized extreme value distribution with the default parameter values: location \(\mu=0\), scale \(\sigma=1\), shape \(\xi=0\).
    • GeneralizedEVD

      public GeneralizedEVD(double location, double scale, double shape)
      Create an instance of generalized extreme value distribution with the given parameters.
      Parameters:
      location - the location parameter \(\mu\)
      scale - the scale parameter \(\sigma > 0\)
      shape - the shape parameter \(\xi\)
  • Method Details

    • getLocation

      public double getLocation()
      Get the location parameter.
      Returns:
      \(\mu\)
    • getScale

      public double getScale()
      Get the scale parameter.
      Returns:
      \(\sigma\)
    • getShape

      public double getShape()
      Get the shape parameter.
      Returns:
      \(\xi\)
    • marginalTransform

      public double marginalTransform(double x)
      Transform to exponential margins under the GEV model. That is, /[ t(x) = \begin{cases} \big(1+(\tfrac{x-\mu}{\sigma})\xi\big)^{-1/\xi} \textrm{if}\ \xi\neq0 \\ e^{-(x-\mu)/\sigma} \textrm{if}\ \xi=0 \end{cases} /]
      Parameters:
      x - \(x\)
      Returns:
      \(t(x)\)
    • marginalInverseTransform

      public double marginalInverseTransform(double x)
      Inverse of marginal transform.
      Parameters:
      x - \(x\)
      Returns:
      \(t^{-1}(x)\)
    • cdf

      public double cdf(double x)
      Gets the cumulative probability F(x) = Pr(X ≤ x). The cumulative distribution function of GEV distribution is \[ F(x;\mu,\sigma,\xi) = \exp\left\{-\left[1+\xi\left(\frac{x-\mu}{\sigma}\right)\right]^{-1/\xi}\right\} \] for \(1+\xi(x-\mu)/\sigma>0\).
      Specified by:
      cdf in interface ProbabilityDistribution
      Parameters:
      x - \(x\)
      Returns:
      \(F(x)\)
      See Also:
    • density

      public double density(double x)
      The density function, which, if exists, is the derivative of F. It describes the density of probability at each point in the sample space.
      f(x) = dF(X) / dx
      This may not always exist.

      For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value. The probability density function of GEV distribution is \[ f(x;\mu,\sigma,\xi) = \frac{1}{\sigma}\left[1+\xi\left(\frac{x-\mu}{\sigma}\right)\right]^{(-1/\xi)-1} \exp\left\{-\left[1+\xi\left(\frac{x-\mu}{\sigma}\right)\right]^{-1/\xi}\right\} \] for \(1+\xi(x-\mu)/\sigma>0\).

      Specified by:
      density in interface ProbabilityDistribution
      Parameters:
      x - \(x\)
      Returns:
      \(f(x)\)
      See Also:
    • logDensity

      public double logDensity(double x)
      Description copied from interface: UnivariateEVD
      Get the logarithm of the probability density function at \(x\), that is, \(\log(f(x))\).
      Specified by:
      logDensity in interface UnivariateEVD
      Parameters:
      x - \(x\)
      Returns:
      \(\log(f(x))\)
    • quantile

      public double quantile(double p)
      Description copied from interface: ProbabilityDistribution
      Gets the quantile, the inverse of the cumulative distribution function. It is the value below which random draws from the distribution would fall u×100 percent of the time.
      
       F-1(u) = x, such that
       Pr(X ≤ x) = u
       
      This may not always exist.
      Specified by:
      quantile in interface ProbabilityDistribution
      Parameters:
      p - u, a quantile
      Returns:
      F-1(u)
      See Also:
    • mean

      public double mean()
      Description copied from interface: ProbabilityDistribution
      Gets the mean of this distribution.
      Specified by:
      mean in interface ProbabilityDistribution
      Returns:
      the mean
      See Also:
    • moment

      public double moment(double x)
      Description copied from interface: ProbabilityDistribution
      The moment generating function is the expected value of etX. That is,
      E(etX)
      This may not always exist.
      Specified by:
      moment in interface ProbabilityDistribution
      Parameters:
      x - t
      Returns:
      E(exp(tX))
      See Also:
    • skew

      public double skew()
      Description copied from interface: ProbabilityDistribution
      Gets the skewness of this distribution.
      Specified by:
      skew in interface ProbabilityDistribution
      Returns:
      the skewness
      See Also:
    • variance

      public double variance()
      Description copied from interface: ProbabilityDistribution
      Gets the variance of this distribution.
      Specified by:
      variance in interface ProbabilityDistribution
      Returns:
      the variance
      See Also:
    • median

      public double median()
      Description copied from interface: ProbabilityDistribution
      Gets the median of this distribution.
      Specified by:
      median in interface ProbabilityDistribution
      Returns:
      the median
      See Also:
    • kurtosis

      public double kurtosis()
      Description copied from interface: ProbabilityDistribution
      Gets the excess kurtosis of this distribution.
      Specified by:
      kurtosis in interface ProbabilityDistribution
      Returns:
      the excess kurtosis
      See Also:
    • entropy

      public double entropy()
      Description copied from interface: ProbabilityDistribution
      Gets the entropy of this distribution.
      Specified by:
      entropy in interface ProbabilityDistribution
      Returns:
      the entropy
      See Also: