JSci.maths.statistics
Class ExponentialDistribution

java.lang.Object
  extended by JSci.maths.statistics.ProbabilityDistribution
      extended by JSci.maths.statistics.ExponentialDistribution

public final class ExponentialDistribution
extends ProbabilityDistribution

The ExponentialDistribution class provides an object for encapsulating exponential distributions.


Constructor Summary
ExponentialDistribution()
          Constructs the standard exponential distribution.
ExponentialDistribution(double decay)
          Constructs an exponential distribution.
ExponentialDistribution(double[] array)
          Constructs an exponential distribution from a data set.
 
Method Summary
 double cumulative(double X)
          Cumulative exponential distribution function.
 double getMean()
          Returns the mean.
 double getScaleParameter()
          Returns the scale parameter.
 double getVariance()
          Returns the variance.
 double inverse(double probability)
          Inverse of the cumulative exponential distribution function.
 double probability(double X)
          Probability density function of an exponential distribution.
 
Methods inherited from class JSci.maths.statistics.ProbabilityDistribution
checkRange, checkRange, findRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExponentialDistribution

public ExponentialDistribution()
Constructs the standard exponential distribution.


ExponentialDistribution

public ExponentialDistribution(double decay)
Constructs an exponential distribution.

Parameters:
decay - the scale parameter.

ExponentialDistribution

public ExponentialDistribution(double[] array)
Constructs an exponential distribution from a data set.

Parameters:
array - a sample.
Method Detail

getScaleParameter

public double getScaleParameter()
Returns the scale parameter.


getMean

public double getMean()
Returns the mean.


getVariance

public double getVariance()
Returns the variance.


probability

public double probability(double X)
Probability density function of an exponential distribution. P(X) = lambdae-lambdaX.

Specified by:
probability in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x has the value X, i.e. P(x=X).

cumulative

public double cumulative(double X)
Cumulative exponential distribution function.

Specified by:
cumulative in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x is less then X, i.e. P(x<X).

inverse

public double inverse(double probability)
Inverse of the cumulative exponential distribution function.

Specified by:
inverse in class ProbabilityDistribution
Returns:
the value X for which P(x<X).