edu.ucla.stat.SOCR.distributions
Class GeneralizedExtremeValueDistribution

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.Distribution
          extended by edu.ucla.stat.SOCR.distributions.GeneralizedExtremeValueDistribution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class GeneralizedExtremeValueDistribution
extends Distribution

This class models the Generalized-Extreme-Value (GEV) Distribution with specified 3 parameters (location, scale, shape): The generalized extreme value distribution (GEV) is a family of continuous probability distributions developed within extreme value theory to combine the Gumbel, FrEchet 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 maZetama of a sequence of independent and identically distributed random variables. Because of this, the GEV distribution is used as an approZetamation to model the maZetama of long (finite) sequences of random variables. http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution http://www.aainformatics.co.uk/Finance/mc/topic9.html


Field Summary
static double EulerConstant
           
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
GeneralizedExtremeValueDistribution()
          Default constructor: creates a beta distribution with mu and sigma parameters equal to 1
GeneralizedExtremeValueDistribution(double[] distData)
           
GeneralizedExtremeValueDistribution(double _mu, double _sigma, double _zeta)
          This general constructor creates a new GEV GeneralizedExtremeValueDistribution with specified parameters
GeneralizedExtremeValueDistribution(float[] distData)
           
 
Method Summary
 double getCDF(double x)
          This method computes the cumulative distribution function
 double getDensity(double x)
          Define the GEV getDensity function
 double getMean()
          This method returns the mean http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 double getMedian()
          This method returns the median http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 double getMode()
          This method returns the Mode http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 double getMu()
           
 java.lang.String getOnlineDescription()
          This method returns an online description of this distribution.
 double[] getParameters()
          This method gets the 3 parameters
 double getSD()
          This method returns the SD http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 double getSigma()
          Get sigma
 double getVariance()
          This method returns the Variance http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 double getZeta()
          Get zeta
 void initialize()
          used for some subclass to initialize before being used
 void paramEstimate(double[] distData)
          Estimate the 3 GEV Distribution parameters
 void setMu(double _mu)
          This method sets mean
 void setParameters(double _mu, double _sigma, double _zeta)
          This method sets the parameters, computes the default interval
 void setSigma(double _sigma)
          This method sets Sigma
 void setZeta(double _zeta)
          This method sets zeta
 void valueChanged(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMaxDensity, getMean, getMGF, getMgfDomain, getName, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, inverseCDF, logGamma, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, simulate, update, valueChanged
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EulerConstant

public static double EulerConstant
Constructor Detail

GeneralizedExtremeValueDistribution

public GeneralizedExtremeValueDistribution(double _mu,
                                           double _sigma,
                                           double _zeta)
This general constructor creates a new GEV GeneralizedExtremeValueDistribution with specified parameters

Parameters:
mu - = location mean
sigma - = scale SD
zeta - = shape skewness

GeneralizedExtremeValueDistribution

public GeneralizedExtremeValueDistribution()
Default constructor: creates a beta distribution with mu and sigma parameters equal to 1


GeneralizedExtremeValueDistribution

public GeneralizedExtremeValueDistribution(double[] distData)

GeneralizedExtremeValueDistribution

public GeneralizedExtremeValueDistribution(float[] distData)
Method Detail

initialize

public void initialize()
Description copied from class: Distribution
used for some subclass to initialize before being used

Overrides:
initialize in class Distribution

valueChanged

public void valueChanged(java.util.Observable o,
                         java.lang.Object arg)
Overrides:
valueChanged in class Distribution

setParameters

public void setParameters(double _mu,
                          double _sigma,
                          double _zeta)
This method sets the parameters, computes the default interval

Parameters:
_zeta - = location
_lambda - = scale
_gamma - = shape
_delta - = shape

getParameters

public double[] getParameters()
This method gets the 3 parameters


paramEstimate

public void paramEstimate(double[] distData)
Estimate the 3 GEV Distribution parameters

Overrides:
paramEstimate in class Distribution
Parameters:
distData - = an array of sample data (loss)

getMu

public double getMu()

setMu

public void setMu(double _mu)
This method sets mean


getSigma

public double getSigma()
Get sigma


setSigma

public void setSigma(double _sigma)
This method sets Sigma


getZeta

public double getZeta()
Get zeta


setZeta

public void setZeta(double _zeta)
This method sets zeta


getDensity

public double getDensity(double x)
Define the GEV getDensity function

Specified by:
getDensity in class Distribution
Parameters:
x - value to evaluate the Density at

getCDF

public double getCDF(double x)
This method computes the cumulative distribution function

Overrides:
getCDF in class Distribution
Parameters:
x - = value to evaluate the CDF at http://www.aainformatics.co.uk/Finance/mc/topic9.html

getMean

public double getMean()
This method returns the mean http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Overrides:
getMean in class Distribution

getMedian

public double getMedian()
This method returns the median http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Overrides:
getMedian in class Distribution

getMode

public double getMode()
This method returns the Mode http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution


getVariance

public double getVariance()
This method returns the Variance http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Overrides:
getVariance in class Distribution

getSD

public double getSD()
This method returns the SD http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Overrides:
getSD in class Distribution

getOnlineDescription

public java.lang.String getOnlineDescription()
This method returns an online description of this distribution.

Overrides:
getOnlineDescription in class Distribution