public class GeneralizedEVD extends Object implements UnivariateEVD
evd::dgev, evd::pgev, evd::qgev, evd::mtransform.
Constructor arguments are location, strictly positive scale, and shape,
in that order. Shape zero gives the Gumbel case. For nonzero shape, the
interior support satisfies 1 + shape * (x - location) / scale > 0.
The quantile method requires a probability strictly between zero and one.
The CDF is zero at or below a finite lower endpoint (positive shape), and one at or above a finite upper endpoint (negative shape). The Gumbel case has support on the entire real line. A NaN argument produces NaN.
import dev.nm.stat.evt.evd.univariate.GeneralizedEVD;
GeneralizedEVD gev = new GeneralizedEVD(0.0, 1.0, 0.0);
double p = 0.95;
double cutoff = gev.quantile(p);
assert Math.abs(gev.cdf(cutoff) - p) < 1e-12;
assert Math.abs(cutoff + Math.log(-Math.log(p))) < 1e-12;
Negative shape bounds maxima from above; positive shape bounds them from below. Cumulative probability keeps its endpoint value outside support.
import dev.nm.stat.evt.evd.univariate.GeneralizedEVD;
GeneralizedEVD upperBounded = new GeneralizedEVD(0, 1, -0.5);
assert upperBounded.cdf(2) == 1.0;
assert upperBounded.cdf(3) == 1.0;
GeneralizedEVD lowerBounded = new GeneralizedEVD(0, 1, 0.5);
assert lowerBounded.cdf(-2) == 0.0;
assert lowerBounded.cdf(-3) == 0.0;
| Constructor and Description |
|---|
GeneralizedEVD()
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.
|
| Modifier and Type | Method and 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 |
entropy()
Gets the entropy of this distribution.
|
double |
getLocation()
Get the location parameter.
|
double |
getScale()
Get the scale parameter.
|
double |
getShape()
Get the shape parameter.
|
double |
kurtosis()
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 |
marginalInverseTransform(double x)
Inverse of marginal transform.
|
double |
marginalTransform(double x)
Transform to exponential margins under the GEV model.
|
double |
mean()
Gets the mean of this distribution.
|
double |
median()
Gets the median of this distribution.
|
double |
moment(double x)
The moment generating function is the expected value of \(e^{tX}\).
|
double |
quantile(double p)
Returns the GEV quantile for an interior probability.
|
double |
skew()
Gets the skewness of this distribution.
|
double |
variance()
Gets the variance of this distribution.
|
public GeneralizedEVD()
public GeneralizedEVD(double location,
double scale,
double shape)
location - the location parameter \(\mu\)scale - the scale parameter \(\sigma > 0\)shape - the shape parameter \(\xi\)public double getLocation()
public double getScale()
public double getShape()
public double marginalTransform(double x)
x - \(x\)public double marginalInverseTransform(double x)
x - \(x\)public double cdf(double x)
cdf in interface ProbabilityDistributionx - \(x\)public double density(double x)
density in interface ProbabilityDistributionx - \(x\)public double logDensity(double x)
UnivariateEVDlogDensity in interface UnivariateEVDx - \(x\)public double quantile(double p)
quantile in interface ProbabilityDistributionp - probability strictly between zero and oneIllegalArgumentException - if p is outside the open interval (0, 1)public double mean()
ProbabilityDistributionmean in interface ProbabilityDistributionpublic double moment(double x)
ProbabilityDistributionmoment in interface ProbabilityDistributionx - tpublic double skew()
ProbabilityDistributionskew in interface ProbabilityDistributionpublic double variance()
ProbabilityDistributionvariance in interface ProbabilityDistributionpublic double median()
ProbabilityDistributionmedian in interface ProbabilityDistributionpublic double kurtosis()
ProbabilityDistributionkurtosis in interface ProbabilityDistributionpublic double entropy()
ProbabilityDistributionentropy in interface ProbabilityDistributionCopyright © 2010-2026 NM Group. All Rights Reserved.