|
| ConstantDist (double c) |
| Constructs a new constant distribution with probability 1 at c .
|
|
double | getMean () |
| Returns the mean \(E[X] = c\). More...
|
|
double | getVariance () |
| Returns the variance \(\mbox{Var}[X] = 0\). More...
|
|
double | getStandardDeviation () |
| Returns the standard deviation = 0. More...
|
|
double | inverseF (double u) |
| Returns the inverse distribution function \(c = F^{-1}(u)\). More...
|
|
| DiscreteDistribution (double[] values, double[] prob, int n) |
| Constructs a discrete distribution over the \(n\) values contained in array values , with probabilities given in array prob . More...
|
|
| DiscreteDistribution (int[] values, double[] prob, int n) |
| Similar to DiscreteDistribution(double[], double[], int).
|
|
double | cdf (double x) |
|
double | barF (double x) |
|
double | inverseF (double u) |
|
double | getMean () |
| Computes the mean \(E[X] = \sum_i^{} p_i x_i\) of the distribution.
|
|
double | getVariance () |
| Computes the variance \(\mbox{Var}[X] = \sum_i^{} p_i (x_i - E[X])^2\) of the distribution.
|
|
double | getStandardDeviation () |
| Computes the standard deviation of the distribution.
|
|
double [] | getParams () |
| Returns a table containing the parameters of the current distribution. More...
|
|
int | getN () |
| Returns the number of possible values \(x_i\).
|
|
double | prob (int i) |
| Returns \(p_i\), the probability of the \(i\)-th value, for. More...
|
|
double | getValue (int i) |
| Returns the \(i\)-th value \(x_i\), for \(0\le i<n\).
|
|
double | getXinf () |
| Returns the lower limit \(x_0\) of the support of the distribution. More...
|
|
double | getXsup () |
| Returns the upper limit \(x_{n-1}\) of the support of the distribution. More...
|
|
String | toString () |
| Returns a String containing information about the current distribution.
|
|
Represents a constant discrete distribution taking a single real value with probability 1.
Its mass function is
\[ p(x) = \left\{\begin{array}{ll} 1, & \qquad\mbox{for } x = c, \\ 0, & \qquad\mbox{elsewhere. } \end{array}\right. \tag{fcons} \]
Its distribution function is
\[ F(x) = \left\{\begin{array}{ll} 0, & \qquad\mbox{ for } x < c \\ 1, & \qquad\mbox{ for } x \ge c. \end{array}\right. \tag{cdfcons} \]