jhplot.math.num.pdf
Class Cauchy
- java.lang.Object
-
- jhplot.math.num.pdf.ContinuousDistribution
-
- jhplot.math.num.pdf.Cauchy
-
- All Implemented Interfaces:
- Distribution
public class Cauchy extends ContinuousDistribution
The Cauchy distribution (1).
References:
- Eric W. Weisstein. "Cauchy Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Cauchy.html
- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor and Description Cauchy()Default constructor.Cauchy(double m, double s)Create a distribution with the given location and scale parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)The CDF for this distribution.doublegetMedian()Access the location parameter.doublegetScale()Access the scale parameter.doubleinverseCumulativeProbability(double p)The inverse CDF for this distribution.voidsetMedian(double m)Modify the location parameter.voidsetScale(double s)Modify the scale parameter.
-
-
-
Constructor Detail
-
Cauchy
public Cauchy()
Default constructor. The location parameter is set to zero and the scale parameter is set to one.
-
Cauchy
public Cauchy(double m, double s)Create a distribution with the given location and scale parameters.- Parameters:
m- the location parameter.s- the scale 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.
-
getMedian
public double getMedian()
Access the location parameter.- Returns:
- the location parameter.
-
getScale
public double getScale()
Access the scale parameter.- Returns:
- the scale 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
-
setMedian
public void setMedian(double m)
Modify the location parameter.- Parameters:
m- The new location parameter value.
-
setScale
public void setScale(double s)
Modify the scale parameter.- Parameters:
s- The new scale parameter value.
-
-
DMelt 3.0 © DataMelt by jWork.ORG