|
| 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 \([\)a \(,\) b \(]\).
|
|
| BetaDist (double alpha, double beta, int d) |
|
| BetaDist (double alpha, double beta, double a, double b, int d) |
|
double | density (double x) |
|
double | cdf (double x) |
| Returns the distribution function \(F(x)\). More...
|
|
double | barF (double x) |
| Returns \(\bar{F}(x) = 1 - F(x)\). More...
|
|
double | inverseF (double u) |
| Returns the inverse distribution function \(F^{-1}(u)\), defined in ( inverseF ). More...
|
|
double | getMean () |
| Returns the mean of the distribution function.
|
|
double | getVariance () |
| Returns the variance of the distribution function.
|
|
double | getStandardDeviation () |
| Returns the standard deviation of the distribution function.
|
|
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, int d) |
|
void | setParams (double alpha, double beta, double a, double b) |
| Sets the parameters of the current distribution. More...
|
|
double [] | getParams () |
| Return an array containing the parameters of the current distribution as [ \(\alpha\), \(\beta\), \(a\), \(b\)].
|
|
String | toString () |
| Returns a String containing information about the current distribution.
|
|
abstract double | density (double x) |
| Returns \(f(x)\), the density evaluated at \(x\). More...
|
|
double | barF (double x) |
| Returns the complementary distribution function. More...
|
|
double | inverseBrent (double a, double b, double u, double tol) |
| Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method. More...
|
|
double | inverseBisection (double u) |
| Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection. More...
|
|
double | inverseF (double u) |
| Returns the inverse distribution function \(x = F^{-1}(u)\). More...
|
|
double | getMean () |
| Returns the mean. More...
|
|
double | getVariance () |
| Returns the variance. More...
|
|
double | getStandardDeviation () |
| Returns the standard deviation. More...
|
|
double | getXinf () |
| Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). More...
|
|
double | getXsup () |
| Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). More...
|
|
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]\). More...
|
|
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]\). More...
|
|
|
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, int d, double x) |
|
static double | cdf (double alpha, double beta, double a, double b, int d, double x) |
|
static double | barF (double alpha, double beta, int d, double x) |
|
static double | barF (double alpha, double beta, double a, double b, int d, double x) |
|
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. More...
|
|
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, int d, double u) |
|
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, int d, double 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 [183] . More...
|
|
static double [] | getMLE (double[] x, int n) |
| Estimates the parameters \((\alpha,\beta)\) of the beta distribution over the interval \([0,1]\) using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\). More...
|
|
static BetaDist | getInstanceFromMLE (double[] x, int n) |
| Creates a new instance of a beta distribution with parameters \(\alpha\) and \(\beta\) over the interval \([0,1]\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\). More...
|
|
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]\). More...
|
|
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 \(\alpha\) and \(\beta\) over the interval \([a, b]\). More...
|
|
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 \(\beta\), over the interval \([0, 1]\). More...
|
|
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 \(\beta\), over the interval \([a, b]\). More...
|
|
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]\). More...
|
|
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]\). More...
|
|
Extends the class ContinuousDistribution for the beta distribution [100] (page 210) with shape parameters \(\alpha> 0\) and \(\beta> 0\), over the interval \([a,b]\), where \(a < b\).
This distribution has density
\[ f(x) = \frac{ (x-a)^{\alpha- 1}(b - x)^{\beta- 1}}{\mathcal{B} (\alpha, \beta)(b - a)^{\alpha+ \beta- 1}}, \qquad\mbox{for } a\le x\le b, \mbox{ and }0\mbox{ elsewhere}, \]
and distribution function
\[ F(x) = I_{\alpha,\beta}(x) = \int_a^x \frac{(\xi- a)^{\alpha-1} (b - \xi)^{\beta-1}}{\mathcal{B} (\alpha, \beta)(b - a)^{\alpha+ \beta- 1}} d\xi, \qquad\mbox{for } a\le x\le b, \tag{Fbeta} \]
where \(\mathcal{B}(\alpha,\beta)\) is the beta function defined by
\[ \mathcal{B} (\alpha,\beta) = \frac{\Gamma(\alpha) \Gamma(\beta)}{ \Gamma(\alpha+\beta)},\tag{betadef} \]
and \(\Gamma(x)\) is the gamma function defined in ( Gamma ).
static double [] getMLE |
( |
double [] |
x, |
|
|
int |
n |
|
) |
| |
|
static |
Estimates the parameters \((\alpha,\beta)\) of the beta distribution over the interval \([0,1]\) 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 maximum likelihood estimators are the values \((\hat{\alpha}, \hat{\beta})\) that satisfy the equations:
\begin{align*} \psi(\alpha) - \psi(\alpha+ \beta) & = \frac{1}{n} \sum_{i=1}^n \ln(x_i) \\ \psi(\beta) - \psi(\alpha+ \beta) & = \frac{1}{n} \sum_{i=1}^n \ln(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)\).
- Parameters
-
x | the list of observations to use to evaluate parameters |
n | the number of observations to use to evaluate parameters |
- Returns
- returns the parameters [ \(\hat{\alpha}\), \(\hat{\beta}\)]