jhplot.math.num.pdf
Class Weibull
- java.lang.Object
-
- jhplot.math.num.pdf.ContinuousDistribution
-
- jhplot.math.num.pdf.Weibull
-
- All Implemented Interfaces:
- Distribution
public class Weibull extends ContinuousDistribution
The Weibull distribution.
References:
- Eric W. Weisstein. "Weibull Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Weibull.html
- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor and Description Weibull()Default constructor.Weibull(double sh, double sc)Create a distribution with the given parameters.Weibull(double sh, double sc, double l)Create a distribution with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)The CDF for this distribution.doublegetLocation()Access the location parameter.doublegetScale()Access the scale parameter.doublegetShape()Access the shape parameter.doubleinverseCumulativeProbability(double p)The inverse CDF for this distribution.voidsetLocation(double l)Modify the location parameter.voidsetScale(double s)Modify the scale parameter.voidsetShape(double s)Modify the shape parameter.
-
-
-
Constructor Detail
-
Weibull
public Weibull()
Default constructor. The shape parameter is set to one, the scale parameter is set to one and, the location parameter is set to zero.
-
Weibull
public Weibull(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.
-
Weibull
public Weibull(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:
cumulativeProbabilityin classContinuousDistribution- 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:
inverseCumulativeProbabilityin classContinuousDistribution- 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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG