Package dev.nm.stat.evt.evd.univariate
Class MaximaDistribution
- java.lang.Object
-
- dev.nm.stat.evt.evd.univariate.MaximaDistribution
-
- All Implemented Interfaces:
ProbabilityDistribution
,UnivariateEVD
public class MaximaDistribution extends Object implements UnivariateEVD
The distribution of \(M\), where \(M=\max(x_1,x_2,...,x_n)\) and \(x_i\)'s are iid samples drawn from of a random variable \(X\) with cdf \(F(x)\). Since \(x_i\)'s are independent, the cumulative distribution function of \(M\) is simply \[ \begin{eqnarray} F_M(x;n) & = & Pr(\max(X_1,X_2,...,X_n) \le x) \\ & = & Pr(X_1 \le x, X_2 \le x, ..., X_n \le x) \\ & = & \prod_{i=1}^nF(x) \\ & = & [F(x)]^n \end{eqnarray} \] The R equivalent functions areevd::dextreme
,evd::pextreme
,evd::qextreme
,evd::rextreme
.
-
-
Constructor Summary
Constructors Constructor Description MaximaDistribution(ProbabilityDistribution dist, int nIIDs)
Create an instance with the probability distribution of \(X\), and the number of iid samples to be drawn.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
cdf(double x)
The cumulative distribution function.double
density(double x)
The probability density function.double
entropy()
Gets the entropy of this distribution.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
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 etX.double
quantile(double p)
Gets the quantile, the inverse of the cumulative distribution function.double
skew()
Gets the skewness of this distribution.double
variance()
Gets the variance of this distribution.
-
-
-
Constructor Detail
-
MaximaDistribution
public MaximaDistribution(ProbabilityDistribution dist, int nIIDs)
Create an instance with the probability distribution of \(X\), and the number of iid samples to be drawn.- Parameters:
dist
- the distribution of \(X\)nIIDs
- the number of independent samples
-
-
Method Detail
-
density
public double density(double x)
The probability density function. That is, \[ f_max(x;n) = \frac{d}{dx}F_max(x;n) = nf(x)[F(x)]^{n-1}. \]- Specified by:
density
in interfaceProbabilityDistribution
- Parameters:
x
- \(x\)- Returns:
- \(f_max(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 interfaceUnivariateEVD
- Parameters:
x
- \(x\)- Returns:
- \(\log(f(x))\)
-
cdf
public double cdf(double x)
The cumulative distribution function. That is, \[ f_max(x;n) = [F(x)]^n. \]- Specified by:
cdf
in interfaceProbabilityDistribution
- Parameters:
x
- \(x\)- Returns:
- \(F_{max}(x)\)
- See Also:
- Wikipedia: Cumulative distribution function
-
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.
This may not always exist.F-1(u) = x, such that Pr(X ≤ x) = u
- Specified by:
quantile
in interfaceProbabilityDistribution
- Parameters:
p
-u
, a quantile- Returns:
- F-1(u)
- See Also:
- Wikipedia: Quantile function
-
mean
public double mean()
Description copied from interface:ProbabilityDistribution
Gets the mean of this distribution.- Specified by:
mean
in interfaceProbabilityDistribution
- Returns:
- the mean
- See Also:
- Wikipedia: Expected value
-
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 interfaceProbabilityDistribution
- Parameters:
x
- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
skew
public double skew()
Description copied from interface:ProbabilityDistribution
Gets the skewness of this distribution.- Specified by:
skew
in interfaceProbabilityDistribution
- Returns:
- the skewness
- See Also:
- Wikipedia: Skewness
-
variance
public double variance()
Description copied from interface:ProbabilityDistribution
Gets the variance of this distribution.- Specified by:
variance
in interfaceProbabilityDistribution
- Returns:
- the variance
- See Also:
- Wikipedia: Variance
-
median
public double median()
Description copied from interface:ProbabilityDistribution
Gets the median of this distribution.- Specified by:
median
in interfaceProbabilityDistribution
- Returns:
- the median
- See Also:
- Wikipedia: Median
-
kurtosis
public double kurtosis()
Description copied from interface:ProbabilityDistribution
Gets the excess kurtosis of this distribution.- Specified by:
kurtosis
in interfaceProbabilityDistribution
- Returns:
- the excess kurtosis
- See Also:
- Wikipedia: Kurtosis
-
entropy
public double entropy()
Description copied from interface:ProbabilityDistribution
Gets the entropy of this distribution.- Specified by:
entropy
in interfaceProbabilityDistribution
- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
-