SSJ
3.3.1
Stochastic Simulation in Java
|
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]\). More... | |
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. More... | |
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 \(\rho_{ij} = \sigma_{ij}/\sqrt{\sigma_{ii}\sigma_{jj}}\). | |
Protected Attributes | |
int | dimension |
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.
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.
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.
|
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 |
x