Specializes the class BetaDist to the case of a symmetrical beta distribution over the interval \([0,1]\), with shape parameters. More...
Public Member Functions | |
| BetaSymmetricalDist (double alpha) | |
| Constructs a BetaSymmetricalDist object with parameters. | |
| BetaSymmetricalDist (double alpha, int d) | |
| Same as BetaSymmetricalDist (alpha), but using approximations of roughly d decimal digits of precision when computing the distribution, complementary distribution, and inverse functions. | |
| 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[] | getParams () |
| Return a table containing the parameter of the current distribution. | |
| String | toString () |
| Returns a String containing information about the current distribution. | |
| Public Member Functions inherited from umontreal.ssj.probdist.BetaDist | |
| BetaDist (double alpha, double beta) | |
| Constructs a BetaDist object with parameters \(\alpha=\) alpha, \(\beta=\) beta and default domain \([0,1]\). | |
| BetaDist (double alpha, double beta, double a, double b) | |
| Constructs a BetaDist object with parameters \(\alpha=\) alpha, \(\beta=\) beta and domain. | |
| double | density (double x) |
| Returns \(f(x)\), the density evaluated at \(x\). | |
| double | getAlpha () |
| Returns the parameter \(\alpha\) of this object. | |
| double | getBeta () |
| Returns the parameter \(\beta\) of this object. | |
| double | getA () |
| Returns the parameter \(a\) of this object. | |
| double | getB () |
| Returns the parameter \(b\) of this object. | |
| void | setParams (double alpha, double beta, double a, double b) |
| Sets the parameters of 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 x) |
| Returns the density evaluated at \(x\). | |
| static double | cdf (double alpha, int d, double x) |
Same as cdf(alpha, alpha, d, x). | |
| static double | barF (double alpha, int d, double x) |
| Returns the complementary distribution function. | |
| static double | inverseF (double alpha, double u) |
| Returns the inverse distribution function evaluated at \(u\), for the symmetrical beta distribution over the interval \([0,1]\), with shape parameters \(0 < \alpha= \beta\) = alpha. | |
| static double[] | getMLE (double[] x, int n) |
| Estimates the parameter \(\alpha\) of the symmetrical beta distribution over the interval [0, 1] using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\). | |
| static BetaSymmetricalDist | getInstanceFromMLE (double[] x, int n) |
| Creates a new instance of a symmetrical beta distribution with parameter \(\alpha\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\). | |
| static double | getMean (double alpha) |
| Computes and returns the mean \(E[X] = 1/2\) of the symmetrical beta distribution with parameter \(\alpha\). | |
| static double | getVariance (double alpha) |
| Computes and returns the variance, \(\mbox{Var}[X] = 1/(8\alpha+ 4)\), of the symmetrical beta distribution with parameter. | |
| static double | getStandardDeviation (double alpha) |
| Computes and returns the standard deviation of the symmetrical beta distribution with parameter \(\alpha\). | |
| Static Public Member Functions inherited from umontreal.ssj.probdist.BetaDist | |
| static double | density (double alpha, double beta, double x) |
Same as density(alpha,
beta, 0, 1, x). | |
| static double | density (double alpha, double beta, double a, double b, double x) |
| Computes the density function of the beta distribution. | |
| static double | cdf (double alpha, double beta, double x) |
Same as cdf(alpha, beta, 0,
1, x). | |
| static double | cdf (double alpha, double beta, double a, double b, double x) |
| Computes the distribution function. | |
| static double | barF (double alpha, double beta, double x) |
Same as barF(alpha, beta, 0,
1, x). | |
| static double | barF (double alpha, double beta, double a, double b, double x) |
| Computes the complementary distribution function. | |
| static double | inverseF (double alpha, double beta, double u) |
Same as inverseF(alpha,
beta, 0, 1, u). | |
| static double | inverseF (double alpha, double beta, double a, double b, double u) |
| Returns the inverse beta distribution function using the algorithm implemented in [178] . | |
| static double | getMean (double alpha, double beta) |
| Computes and returns the mean \(E[X] = \alpha/ (\alpha+ \beta)\) of the beta distribution with parameters \(\alpha\) and \(\beta\), over the interval \([0, 1]\). | |
| static double | getMean (double alpha, double beta, double a, double b) |
| Computes and returns the mean \(E[X] = (b\alpha+ a\beta)/ (\alpha+ \beta)\) of the beta distribution with parameters. | |
| static double | getVariance (double alpha, double beta) |
| Computes and returns the variance \(\mbox{Var}[X] =
\frac{\alpha\beta}{(\alpha+ \beta)^2 (\alpha+ \beta+ 1)}\) of the beta distribution with parameters \(\alpha\) and. | |
| static double | getVariance (double alpha, double beta, double a, double b) |
| Computes and returns the variance \(\mbox{Var}[X] =
\frac{\alpha\beta(b-a)^2}{(\alpha+ \beta)^2 (\alpha+ \beta+ 1)}\) of the beta distribution with parameters \(\alpha\) and. | |
| static double | getStandardDeviation (double alpha, double beta) |
| Computes the standard deviation of the beta distribution with parameters \(\alpha\) and \(\beta\), over the interval \([0, 1]\). | |
| static double | getStandardDeviation (double alpha, double beta, double a, double b) |
| Computes the standard deviation of the beta distribution with parameters \(\alpha\) and \(\beta\), over the interval \([a, b]\). | |
Specializes the class BetaDist to the case of a symmetrical beta distribution over the interval \([0,1]\), with shape parameters.
\(\alpha= \beta\). Faster methods are implemented here for this special case [129] . Because of the symmetry around 1/2, four series are used to compute the cdf, two around \(x = 0\) and two around \(x = 1/2\).
Definition at line 43 of file BetaSymmetricalDist.java.
| umontreal.ssj.probdist.BetaSymmetricalDist.BetaSymmetricalDist | ( | double | alpha | ) |
Constructs a BetaSymmetricalDist object with parameters.
\(\alpha= \beta=\) alpha, over the unit interval \((0,1)\).
Definition at line 80 of file BetaSymmetricalDist.java.
| umontreal.ssj.probdist.BetaSymmetricalDist.BetaSymmetricalDist | ( | double | alpha, |
| int | d ) |
Same as BetaSymmetricalDist (alpha), but using approximations of roughly d decimal digits of precision when computing the distribution, complementary distribution, and inverse functions.
Definition at line 90 of file BetaSymmetricalDist.java.
|
static |
Returns the complementary distribution function.
Definition at line 124 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.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.BetaDist.
Definition at line 99 of file BetaSymmetricalDist.java.
|
static |
Same as cdf(alpha, alpha, d, x).
Definition at line 117 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 95 of file BetaSymmetricalDist.java.
|
static |
Returns the density evaluated at \(x\).
Definition at line 110 of file BetaSymmetricalDist.java.
|
static |
Creates a new instance of a symmetrical beta distribution with parameter \(\alpha\) 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 |
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 849 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.getMean | ( | ) |
Returns the mean.
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 784 of file BetaSymmetricalDist.java.
|
static |
Computes and returns the mean \(E[X] = 1/2\) of the symmetrical beta distribution with parameter \(\alpha\).
Definition at line 860 of file BetaSymmetricalDist.java.
|
static |
Estimates the parameter \(\alpha\) of the symmetrical beta distribution over the interval [0, 1] using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
The estimate is returned in element 0 of the returned array. The maximum likelihood estimator \(\hat{\alpha}\) satisfies the equation
\begin{align*} \psi(\hat{\alpha}) - \psi(2\hat{\alpha}) = \frac{1}{2n} \sum_{i=1}^n \ln(x_i(1 - x_i)) \end{align*}
where \(\bar{x}_n\) is the average of \(x[0], …, x[n-1]\), and \(\psi\) is the logarithmic derivative of the Gamma function \(\psi(x) = \Gamma’(x) / \Gamma(x)\).
| x | the list of observations to use to evaluate parameters |
| n | the number of observations to use to evaluate parameters |
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 812 of file BetaSymmetricalDist.java.
| double[] umontreal.ssj.probdist.BetaSymmetricalDist.getParams | ( | ) |
Return a table containing the parameter of the current distribution.
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 925 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.getStandardDeviation | ( | ) |
Returns the standard deviation.
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 792 of file BetaSymmetricalDist.java.
|
static |
Computes and returns the standard deviation of the symmetrical beta distribution with parameter \(\alpha\).
Definition at line 887 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.getVariance | ( | ) |
Returns the variance.
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 788 of file BetaSymmetricalDist.java.
|
static |
Computes and returns the variance, \(\mbox{Var}[X] = 1/(8\alpha+ 4)\), of the symmetrical beta distribution with parameter.
\(\alpha\).
Definition at line 874 of file BetaSymmetricalDist.java.
|
static |
Returns the inverse distribution function evaluated at \(u\), for the symmetrical beta distribution over the interval \([0,1]\), with shape parameters \(0 < \alpha= \beta\) = alpha.
Uses four different hypergeometric series to compute the distribution \(u = F(x)\) (for the four cases \(x\) close to 0 and \(\alpha< 1\),
\(x\) close to 0 and \(\alpha> 1\), \(x\) close to 1/2 and \(\alpha< 1\), and \(x\) close to 1/2 and \(\alpha> 1\)), which are then solved by Newton’s method for the solution of equations. For \(\alpha> 100000\), uses a normal approximation given in [195] .
Definition at line 141 of file BetaSymmetricalDist.java.
| double umontreal.ssj.probdist.BetaSymmetricalDist.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.BetaDist.
Definition at line 103 of file BetaSymmetricalDist.java.
| String umontreal.ssj.probdist.BetaSymmetricalDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Reimplemented from umontreal.ssj.probdist.BetaDist.
Definition at line 933 of file BetaSymmetricalDist.java.