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

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

public class CauchyDistribution
extends ContinuousDistribution

The Cauchy distribution (1).

References:

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

Since:
1.1
Version:
$Revision: 1.2 $ $Date: 2007/10/25 04:44:10 $

Constructor Summary
CauchyDistribution()
          Default constructor.
CauchyDistribution(double m, double s)
          Create a distribution with the given location and scale parameters.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getMedian()
          Access the location parameter.
 double getScale()
          Access the scale parameter.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setMedian(double m)
          Modify the location parameter.
 void setScale(double s)
          Modify the scale 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

CauchyDistribution

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


CauchyDistribution

public CauchyDistribution(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:
cumulativeProbability in class ContinuousDistribution
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:
inverseCumulativeProbability in class ContinuousDistribution
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.


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