Classes implementing multi-dimensional discrete distributions over the integers should inherit from this class. More...
Public Member Functions | |
| abstract double | prob (int[] x) |
| Returns the probability mass function \(p(x_1, x_2, …, x_d)\), which should be a real number in \([0,1]\). | |
| double | cdf (int x[]) |
| Computes the cumulative probability function \(F\) of the distribution evaluated at x, assuming the lowest values start at 0, i.e. | |
| int | getDimension () |
| Returns the dimension \(d\) of the distribution. | |
| abstract double[] | getMean () |
| Returns the mean vector of the distribution, defined as \(\mu_i = E[X_i]\). | |
| abstract double[][] | getCovariance () |
| Returns the variance-covariance matrix of the distribution, defined as \(\sigma_{ij} = E[(X_i - \mu_i)(X_j - \mu_j)]\). | |
| abstract double[][] | getCorrelation () |
| Returns the correlation matrix of the distribution, defined as. | |
Classes implementing multi-dimensional discrete distributions over the integers should inherit from this class.
It specifies the signature of methods for computing the mass function (or probability) \(p(x_1, x_2, …, x_d) = P[X_1 = x_1, X_2 = x_2, …, X_d = x_d]\) and the cumulative probabilities for a random vector \(X\) with a discrete distribution over the integers.
Definition at line 39 of file DiscreteDistributionIntMulti.java.
| double umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti.cdf | ( | int | x[] | ) |
Computes the cumulative probability function \(F\) of the distribution evaluated at x, assuming the lowest values start at 0, i.e.
computes
\[ F (x_1, x_2, …, x_d) = \sum_{s_1=0}^{x_1} \sum_{s_2=0}^{x_2} \cdots\sum_{s_d=0}^{x_d} p(s_1, s_2, …, s_d). \]
Uses the naive implementation, is very inefficient and may underflows.
Reimplemented in umontreal.ssj.probdistmulti.MultinomialDist.
Definition at line 58 of file DiscreteDistributionIntMulti.java.
|
abstract |
Returns the correlation matrix of the distribution, defined as.
\(\rho_{ij} = \sigma_{ij}/\sqrt{\sigma_{ii}\sigma_{jj}}\).
Reimplemented in umontreal.ssj.probdistmulti.MultinomialDist, and umontreal.ssj.probdistmulti.NegativeMultinomialDist.
|
abstract |
Returns the variance-covariance matrix of the distribution, defined as
\(\sigma_{ij} = E[(X_i - \mu_i)(X_j - \mu_j)]\).
Reimplemented in umontreal.ssj.probdistmulti.MultinomialDist, and umontreal.ssj.probdistmulti.NegativeMultinomialDist.
| int umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti.getDimension | ( | ) |
Returns the dimension \(d\) of the distribution.
Definition at line 89 of file DiscreteDistributionIntMulti.java.
|
abstract |
Returns the mean vector of the distribution, defined as \(\mu_i = E[X_i]\).
Reimplemented in umontreal.ssj.probdistmulti.MultinomialDist, and umontreal.ssj.probdistmulti.NegativeMultinomialDist.
|
abstract |
Returns the probability mass function \(p(x_1, x_2, …, x_d)\), which should be a real number in \([0,1]\).
| x | value at which the mass function must be evaluated |
Reimplemented in umontreal.ssj.probdistmulti.MultinomialDist, and umontreal.ssj.probdistmulti.NegativeMultinomialDist.