Extends the class ContinuousDistribution for the folded normal distribution with parameters \(\mu\ge0\) and \(\sigma> 0\). More...
Public Member Functions | |
| FoldedNormalDist (double mu, double sigma) | |
| Constructs a FoldedNormalDist object with parameters \(\mu=\) mu and \(\sigma=\) sigma. | |
| 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 | getMu () |
| Returns the parameter \(\mu\) of this object. | |
| double | getSigma () |
| Returns the parameter \(\sigma\) of this object. | |
| void | setParams (double mu, double sigma) |
| Sets the parameters \(\mu\) and \(\sigma\) for this object. | |
| double[] | getParams () |
| Return a table containing the 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 mu, double sigma, double x) |
| Computes the density function of the folded normal distribution. | |
| static double | cdf (double mu, double sigma, double x) |
| Computes the distribution function. | |
| static double | barF (double mu, double sigma, double x) |
| Computes the complementary distribution function. | |
| static double | inverseF (double mu, double sigma, double u) |
| Computes the inverse of the distribution function. | |
| static double | getMean (double mu, double sigma) |
| Computes and returns the mean. | |
| static double | getVariance (double mu, double sigma) |
| Computes and returns the variance. | |
| static double | getStandardDeviation (double mu, double sigma) |
| Computes the standard deviation of the folded normal distribution with parameters \(\mu\) and \(\sigma\). | |
| static double[] | getMLE (double[] x, int n) |
| NOT IMPLEMENTED. | |
Extends the class ContinuousDistribution for the folded normal distribution with parameters \(\mu\ge0\) and \(\sigma> 0\).
The density is
\[ f(x) = \phi\left(\frac{x-\mu}{\sigma}\right) + \phi\left(\frac{-x-\mu}{\sigma}\right) \qquad\mbox{for } x \ge0, \tag{fFoldedNormal} \]
\[ f(x) = 0, \qquad\mbox{ for } x < 0, \]
where \( \phi\) denotes the density function of a standard normal distribution.
Definition at line 47 of file FoldedNormalDist.java.
| umontreal.ssj.probdist.FoldedNormalDist.FoldedNormalDist | ( | double | mu, |
| double | sigma ) |
Constructs a FoldedNormalDist object with parameters \(\mu=\) mu and \(\sigma=\) sigma.
Definition at line 70 of file FoldedNormalDist.java.
|
static |
Computes the complementary distribution function.
| mu | the parameter mu |
| sigma | the parameter sigma |
| x | the value at which the complementary distribution is evaluated |
Definition at line 146 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.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 82 of file FoldedNormalDist.java.
|
static |
Computes the distribution function.
| mu | the parameter mu |
| sigma | the parameter sigma |
| x | the value at which the distribution is evaluated |
Definition at line 128 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.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 78 of file FoldedNormalDist.java.
|
static |
Computes the density function of the folded normal distribution.
| mu | the parameter mu |
| sigma | the parameter sigma |
| x | the value at which the density is evaluated |
Definition at line 110 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.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 74 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.getMean | ( | ) |
Returns the mean.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 90 of file FoldedNormalDist.java.
|
static |
Computes and returns the mean.
\[ E[X] = \sigma\sqrt{\frac{2}{\pi}}\; e^{-\mu^2/(2\sigma^2)} + \mu \mbox{erf}\left(\frac{\mu}{\sigma\sqrt{2}}\right), \]
where erf \((z)\) is the error function.
| mu | the parameter mu |
| sigma | the parameter sigma |
Definition at line 190 of file FoldedNormalDist.java.
|
static |
NOT IMPLEMENTED.
Les formules pour le MLE sont données dans
[160] .
| x | the list of observations used to evaluate parameters |
| n | the number of observations used to evaluate parameters |
Definition at line 239 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.getMu | ( | ) |
Returns the parameter \(\mu\) of this object.
Definition at line 250 of file FoldedNormalDist.java.
| double[] umontreal.ssj.probdist.FoldedNormalDist.getParams | ( | ) |
Return a table containing the parameters of the current distribution.
This table is put in regular order: [ \(\mu\), \(\sigma\)].
Implements umontreal.ssj.probdist.Distribution.
Definition at line 284 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.getSigma | ( | ) |
Returns the parameter \(\sigma\) of this object.
Definition at line 259 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.getStandardDeviation | ( | ) |
Returns the standard deviation.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 98 of file FoldedNormalDist.java.
|
static |
Computes the standard deviation of the folded normal distribution with parameters \(\mu\) and \(\sigma\).
| mu | the parameter mu |
| sigma | the parameter sigma |
Definition at line 226 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.getVariance | ( | ) |
Returns the variance.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 94 of file FoldedNormalDist.java.
|
static |
Computes and returns the variance.
\[ \mbox{Var}[X] = \mu^2 + \sigma^2 - E[X]^2. \]
| mu | the parameter mu |
| sigma | the parameter sigma |
Definition at line 208 of file FoldedNormalDist.java.
|
static |
Computes the inverse of the distribution function.
| mu | the parameter mu |
| sigma | the parameter sigma |
| u | the value at which the inverse distribution is evaluated |
Definition at line 164 of file FoldedNormalDist.java.
| double umontreal.ssj.probdist.FoldedNormalDist.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 86 of file FoldedNormalDist.java.
| void umontreal.ssj.probdist.FoldedNormalDist.setParams | ( | double | mu, |
| double | sigma ) |
Sets the parameters \(\mu\) and \(\sigma\) for this object.
| mu | the parameter mu |
| sigma | the parameter sigma |
Definition at line 269 of file FoldedNormalDist.java.
| String umontreal.ssj.probdist.FoldedNormalDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Definition at line 295 of file FoldedNormalDist.java.