jhplot.math.num.pdf
Class LogNormal
- java.lang.Object
-
- jhplot.math.num.pdf.ContinuousDistribution
-
- jhplot.math.num.pdf.LogNormal
-
- All Implemented Interfaces:
- Distribution
public class LogNormal extends ContinuousDistribution
The Log Normal distribution.
References:
- Eric W. Weisstein. "Log Normal Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/LogNormal.html
- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor and Description LogNormal()Default constructor.LogNormal(double m, double s)Create a distribution with the given mean and standard deviation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)The CDF for this distribution.doublegetMean()Access the mean.doublegetStandardDeviation()Access the standard deviation.doubleinverseCumulativeProbability(double p)The inverse CDF for this distribution.voidsetMean(double m)Modify the mean.voidsetStandardDeviation(double std)Modify the standard deviation.
-
-
-
Constructor Detail
-
LogNormal
public LogNormal()
Default constructor. Mean is set to zero and standard deviation is set to one.
-
LogNormal
public LogNormal(double m, double s)Create a distribution with the given mean and standard deviation.- Parameters:
m- the mean.s- the standard deviation.
-
-
Method Detail
-
cumulativeProbability
public double cumulativeProbability(double x) throws NumericExceptionThe 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.
- Throws:
NumericException- if the cumulative probability can not be computed.
-
getMean
public double getMean()
Access the mean.- Returns:
- the mean.
-
getStandardDeviation
public double getStandardDeviation()
Access the standard deviation.- Returns:
- the standard deviation.
-
inverseCumulativeProbability
public double inverseCumulativeProbability(double p) throws NumericExceptionThe 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
- Throws:
NumericException- if the inverse cumulative probability can not be computed.
-
setMean
public void setMean(double m)
Modify the mean.- Parameters:
m- the new mean value.
-
setStandardDeviation
public void setStandardDeviation(double std)
Modify the standard deviation.- Parameters:
std- The new standard deviation value.
-
-
DMelt 3.0 © DataMelt by jWork.ORG