|
SSJ
3.3.1
Stochastic Simulation in Java
|
Extends the class DiscreteDistributionInt for the logarithmic distribution. More...
Public Member Functions | |
| LogarithmicDist (double theta) | |
Constructs a logarithmic distribution with parameter \(\theta= \) theta. | |
| double | prob (int x) |
| double | cdf (int x) |
| double | barF (int x) |
| int | inverseFInt (double u) |
| 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 | getTheta () |
| Returns the \(\theta\) associated with this object. | |
| void | setTheta (double theta) |
| Sets the \(\theta\) associated with 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 DiscreteDistributionInt | |
| abstract double | prob (int x) |
| Returns \(p(x)\), the probability of \(x\). More... | |
| double | cdf (double x) |
| Returns the distribution function \(F\) evaluated at \(x\) (see ( FDistDisc )). More... | |
| abstract double | cdf (int x) |
| Returns the distribution function \(F\) evaluated at \(x\) (see ( FDistDisc )). More... | |
| double | barF (double x) |
| Returns \(\bar{F}(x)\), the complementary distribution function. More... | |
| double | barF (int x) |
| Returns \(\bar{F}(x)\), the complementary distribution function. More... | |
| int | getXinf () |
| Returns the lower limit \(x_a\) of the support of the probability mass function. More... | |
| int | getXsup () |
| Returns the upper limit \(x_b\) of the support of the probability mass function. More... | |
| double | inverseF (double u) |
| Returns the inverse distribution function \(F^{-1}(u)\), where. More... | |
| int | inverseFInt (double u) |
| Returns the inverse distribution function \(F^{-1}(u)\), where. More... | |
Static Public Member Functions | |
| static double | prob (double theta, int x) |
| Computes the logarithmic probability \(p(x)\) given in ( flogar ) . | |
| static double | cdf (double theta, int x) |
| Computes the distribution function \(F(x)\). | |
| static double | barF (double theta, int x) |
| Computes the complementary distribution function. More... | |
| static int | inverseF (double theta, double u) |
| static double [] | getMLE (int[] x, int n) |
| Estimates the parameter \(\theta\) of the logarithmic distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\). More... | |
| static LogarithmicDist | getInstanceFromMLE (int[] x, int n) |
| Creates a new instance of a logarithmic distribution with parameter \(\theta\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\). More... | |
| static double | getMean (double theta) |
| Computes and returns the mean \[ E[X] = \frac{-\theta}{(1 - \theta)\ln(1 - \theta)} \] of the logarithmic distribution with parameter \(\theta= \) | |
| static double | getVariance (double theta) |
| Computes and returns the variance \[ \mbox{Var}[X] = \frac{-\theta(\theta+ \ln(1 - \theta))}{[(1 - \theta) \ln(1 - \theta)]^2} \] of the logarithmic distribution with parameter \(\theta=\) | |
| static double | getStandardDeviation (double theta) |
Computes and returns the standard deviation of the logarithmic distribution with parameter \(\theta= \) theta. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from DiscreteDistributionInt | |
| static double | EPSILON = 1.0e-16 |
| Environment variable that determines what probability terms can be considered as negligible when building precomputed tables for distribution and mass functions. More... | |
Protected Attributes inherited from DiscreteDistributionInt | |
| double | cdf [] = null |
| double | pdf [] = null |
| int | xmin = 0 |
| int | xmax = 0 |
| int | xmed = 0 |
| int | supportA = Integer.MIN_VALUE |
| int | supportB = Integer.MAX_VALUE |
Static Protected Attributes inherited from DiscreteDistributionInt | |
| static final double | EPS_EXTRA = 1.0e-6 |
Extends the class DiscreteDistributionInt for the logarithmic distribution.
It has shape parameter \(\theta\), where \(0 < \theta<1\). Its mass function is
\[ p(x) = \frac{-\theta^x}{x\log(1- \theta)} \qquad\mbox{for } x = 1,2,3,…\tag{flogar} \]
Its distribution function is
\[ F(x) = \frac{-1}{\log(1 - \theta)}\sum_{i=1}^x \frac{\theta^i}{i}, \qquad\mbox{ for } x = 1, 2, 3, … \]
and is 0 for \( x\le0\).
|
static |
Computes the complementary distribution function.
WARNING: The complementary distribution function is defined as \(\bar{F}(x) = P[X \ge x]\).
|
static |
Creates a new instance of a logarithmic distribution with parameter \(\theta\) 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 |
|
static |
Computes and returns the mean
\[ E[X] = \frac{-\theta}{(1 - \theta)\ln(1 - \theta)} \]
of the logarithmic distribution with parameter \(\theta= \) theta.
|
static |
Estimates the parameter \(\theta\) of the logarithmic distribution 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{\theta}\) satisfies the equation (see [56] (page 122))
\begin{align*} \bar{x}_n = \frac{-\hat{\theta}}{(1 - \hat{\theta}) \ln(1 - \hat{\theta})} \end{align*}
where \(\bar{x}_n\) is the average of \(x[0], …, x[n-1]\).
| x | the list of observations used to evaluate parameters |
| n | the number of observations used to evaluate parameters |
|
static |
Computes and returns the standard deviation of the logarithmic distribution with parameter \(\theta= \) theta.
|
static |
Computes and returns the variance
\[ \mbox{Var}[X] = \frac{-\theta(\theta+ \ln(1 - \theta))}{[(1 - \theta) \ln(1 - \theta)]^2} \]
of the logarithmic distribution with parameter \(\theta=\) theta.
1.8.14