jhplot.math.num.pdf
Class Exponential

java.lang.Object
  extended by jhplot.math.num.pdf.ContinuousDistribution
      extended by jhplot.math.num.pdf.Exponential
All Implemented Interfaces:
Distribution

public class Exponential
extends ContinuousDistribution

The Exponential distribution (1).

References:

  1. Eric W. Weisstein. "Exponential Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Exponential.html


Constructor Summary
Exponential()
          Default constructor.
Exponential(double m)
          Create a distribution with the given mean.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getMean()
          Access the mean.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setMean(double m)
          Modify the mean.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exponential

public Exponential()
Default constructor. Mean is set to 1.


Exponential

public Exponential(double m)
Create a distribution with the given mean.

Parameters:
m - the mean.
Method Detail

cumulativeProbability

public double cumulativeProbability(double x)
The CDF for this distribution. This method returns P(X < x).

Specified by:
cumulativeProbability in class ContinuousDistribution
Parameters:
x - the value at which the CDF is evaluated.
Returns:
CDF for this distribution.

getMean

public double getMean()
Access the mean.

Returns:
the mean.

inverseCumulativeProbability

public double inverseCumulativeProbability(double p)
The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.

Specified by:
inverseCumulativeProbability in class ContinuousDistribution
Parameters:
p - the cumulative probability.
Returns:
x

setMean

public void setMean(double m)
Modify the mean.

Parameters:
m - The new mean value.


jHepWork 3.1 ©