net.sf.doodleproject.numerics4j.statistics.distribution
Class WeibullDistribution

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
      extended by net.sf.doodleproject.numerics4j.statistics.distribution.WeibullDistribution
All Implemented Interfaces:
Distribution

public class WeibullDistribution
extends ContinuousDistribution

The Weibull distribution.

References:

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

Since:
1.3
Version:
$Revision: 1.3 $ $Date: 2007/11/08 17:38:02 $

Constructor Summary
WeibullDistribution()
          Default constructor.
WeibullDistribution(double sh, double sc)
          Create a distribution with the given parameters.
WeibullDistribution(double sh, double sc, double l)
          Create a distribution with the given parameters.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getLocation()
          Access the location parameter.
 double getScale()
          Access the scale parameter.
 double getShape()
          Access the shape parameter.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setLocation(double l)
          Modify the location parameter.
 void setScale(double s)
          Modify the scale parameter.
 void setShape(double s)
          Modify the shape parameter.
 
Methods inherited from class net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
findInverseCumulativeProbability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeibullDistribution

public WeibullDistribution()
Default constructor. The shape parameter is set to one, the scale parameter is set to one and, the location parameter is set to zero.


WeibullDistribution

public WeibullDistribution(double sh,
                           double sc)
Create a distribution with the given parameters. The location parameter is set to zero.

Parameters:
sh - the shape parameter.
sc - the scale parameter.

WeibullDistribution

public WeibullDistribution(double sh,
                           double sc,
                           double l)
Create a distribution with the given parameters.

Parameters:
sh - the shape parameter.
sc - the scale parameter.
l - the location parameter.
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.

getLocation

public double getLocation()
Access the location parameter.

Returns:
the location parameter.

getScale

public double getScale()
Access the scale parameter.

Returns:
the scale parameter.

getShape

public double getShape()
Access the shape parameter.

Returns:
the shape parameter.

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

setLocation

public void setLocation(double l)
Modify the location parameter.

Parameters:
l - the new location parameter.

setScale

public void setScale(double s)
Modify the scale parameter.

Parameters:
s - The new scale parameter.

setShape

public void setShape(double s)
Modify the shape parameter.

Parameters:
s - the new shape parameter.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.