Extends the class ContinuousDistribution for the Cauchy distribution [95] (page 299) with location parameter. More...
Public Member Functions | |
| CauchyDist () | |
| Constructs a CauchyDist object with parameters \(\alpha=0\) and \(\beta=1\). | |
| CauchyDist (double alpha, double beta) | |
| Constructs a CauchyDist object with parameters \(\alpha=\) alpha and \(\beta=\) beta. | |
| double | density (double x) |
| Returns \(f(x)\), the density evaluated at \(x\). | |
| double | cdf (double x) |
| Returns the distribution function \(F(x)\). | |
| double | barF (double x) |
| Returns the complementary distribution function. | |
| double | inverseF (double u) |
| Returns the inverse distribution function \(x = F^{-1}(u)\). | |
| double | getMean () |
| Returns the mean. | |
| double | getVariance () |
| Returns the variance. | |
| double | getStandardDeviation () |
| Returns the standard deviation. | |
| double | getAlpha () |
| Returns the value of \(\alpha\) for this object. | |
| double | getBeta () |
| Returns the value of \(\beta\) for this object. | |
| void | setParams (double alpha, double beta) |
| Sets the value of the parameters \(\alpha\) and \(\beta\) for this object. | |
| double[] | getParams () |
| Return a table containing parameters of the current distribution. | |
| String | toString () |
| Returns a String containing information about the current distribution. | |
| Public Member Functions inherited from umontreal.ssj.probdist.ContinuousDistribution | |
| double | inverseBrent (double a, double b, double u, double tol) |
| Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method. | |
| double | inverseBisection (double u) |
| Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection. | |
| double | getXinf () |
| Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). | |
| double | getXsup () |
| Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). | |
| void | setXinf (double xa) |
| Sets the value \(x_a=\) xa, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). | |
| void | setXsup (double xb) |
| Sets the value \(x_b=\) xb, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). | |
Static Public Member Functions | |
| static double | density (double alpha, double beta, double x) |
| Computes the density function. | |
| static double | cdf (double alpha, double beta, double x) |
| Computes the distribution function. | |
| static double | barF (double alpha, double beta, double x) |
| Computes the complementary distribution. | |
| static double | inverseF (double alpha, double beta, double u) |
| Computes the inverse of the distribution. | |
| static double[] | getMLE (double[] x, int n) |
| Estimates the parameters \((\alpha,\beta)\) of the Cauchy distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\). | |
| static CauchyDist | getInstanceFromMLE (double[] x, int n) |
| Creates a new instance of a Cauchy distribution with parameters. | |
| static double | getMean (double alpha, double beta) |
| Throws an exception since the mean does not exist. | |
| static double | getVariance (double alpha, double beta) |
| Returns \(\infty\) since the variance does not exist. | |
| static double | getStandardDeviation (double alpha, double beta) |
| Returns \(\infty\) since the standard deviation does not exist. | |
Extends the class ContinuousDistribution for the Cauchy distribution [95] (page 299) with location parameter.
\(\alpha\) and scale parameter \(\beta> 0\). The density function is given by
\[ f (x) = \frac{\beta}{\pi[(x-\alpha)^2 + \beta^2]}, \qquad\qquad\mbox{for } -\infty< x < \infty. \tag{fcuachy} \]
The distribution function is
\[ F (x) = \frac{1}{2} + \frac{\arctan((x - \alpha)/\beta)}{\pi}, \qquad\qquad\mbox{for } -\infty< x < \infty, \]
and its inverse is
\[ F^{-1} (u) = \alpha+ \beta\tan(\pi(u - 1/2)). \qquad\mbox{for } 0 < u < 1. \]
Definition at line 47 of file CauchyDist.java.
| umontreal.ssj.probdist.CauchyDist.CauchyDist | ( | ) |
Constructs a CauchyDist object with parameters \(\alpha=0\) and \(\beta=1\).
Definition at line 84 of file CauchyDist.java.
| umontreal.ssj.probdist.CauchyDist.CauchyDist | ( | double | alpha, |
| double | beta ) |
Constructs a CauchyDist object with parameters \(\alpha=\) alpha and \(\beta=\) beta.
Definition at line 92 of file CauchyDist.java.
|
static |
Computes the complementary distribution.
Definition at line 149 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.barF | ( | double | x | ) |
Returns the complementary distribution function.
The default implementation computes \(\bar{F}(x) = 1 - F(x)\).
| x | value at which the complementary distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 104 of file CauchyDist.java.
|
static |
Computes the distribution function.
Definition at line 137 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Implements umontreal.ssj.probdist.Distribution.
Definition at line 100 of file CauchyDist.java.
|
static |
Computes the density function.
Definition at line 127 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.density | ( | double | x | ) |
Returns \(f(x)\), the density evaluated at \(x\).
| x | value at which the density is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 96 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.getAlpha | ( | ) |
Returns the value of \(\alpha\) for this object.
Definition at line 272 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.getBeta | ( | ) |
Returns the value of \(\beta\) for this object.
Definition at line 279 of file CauchyDist.java.
|
static |
Creates a new instance of a Cauchy distribution with parameters.
\(\alpha\) and \(\beta\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
| x | the list of observations to use to evaluate parameters |
| n | the number of observations to use to evaluate parameters |
Definition at line 230 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.getMean | ( | ) |
Returns the mean.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 112 of file CauchyDist.java.
|
static |
Throws an exception since the mean does not exist.
| UnsupportedOperationException | the mean of the Cauchy distribution is undefined. |
Definition at line 241 of file CauchyDist.java.
|
static |
Estimates the parameters \((\alpha,\beta)\) of the Cauchy distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\).
The estimates are returned in a two-element array, in regular order: [ \(\alpha\), \(\beta\)]. The estimates of the parameters are given by maximizing numerically the log-likelihood function, using the Uncmin package [203], [224] .
| x | the list of observations to use to evaluate parameters |
| n | the number of observations to use to evaluate parameters |
Definition at line 189 of file CauchyDist.java.
| double[] umontreal.ssj.probdist.CauchyDist.getParams | ( | ) |
Return a table containing parameters of the current distribution.
This table is put in regular order: [ \(\alpha\), \(\beta\)].
Implements umontreal.ssj.probdist.Distribution.
Definition at line 298 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.getStandardDeviation | ( | ) |
Returns the standard deviation.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 120 of file CauchyDist.java.
|
static |
Returns \(\infty\) since the standard deviation does not exist.
Definition at line 265 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.getVariance | ( | ) |
Returns the variance.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 116 of file CauchyDist.java.
|
static |
Returns \(\infty\) since the variance does not exist.
Definition at line 253 of file CauchyDist.java.
|
static |
Computes the inverse of the distribution.
Definition at line 161 of file CauchyDist.java.
| double umontreal.ssj.probdist.CauchyDist.inverseF | ( | double | u | ) |
Returns the inverse distribution function \(x = F^{-1}(u)\).
Restrictions: \(u \in[0,1]\).
| u | value at which the inverse distribution function is evaluated |
| IllegalArgumentException | if \(u\) is not in the interval \([0,1]\) |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 108 of file CauchyDist.java.
| void umontreal.ssj.probdist.CauchyDist.setParams | ( | double | alpha, |
| double | beta ) |
Sets the value of the parameters \(\alpha\) and \(\beta\) for this object.
Definition at line 287 of file CauchyDist.java.
| String umontreal.ssj.probdist.CauchyDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Definition at line 306 of file CauchyDist.java.