SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Protected Attributes | List of all members
DiscreteDistributionIntMulti Class Referenceabstract

Classes implementing multi-dimensional discrete distributions over the integers should inherit from this class. More...

Inheritance diagram for DiscreteDistributionIntMulti:
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ cdf()

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.

◆ prob()

abstract double prob ( int []  x)
abstract

Returns the probability mass function \(p(x_1, x_2, …, x_d)\), which should be a real number in \([0,1]\).

Parameters
xvalue at which the mass function must be evaluated
Returns
the mass function evaluated at x

The documentation for this class was generated from the following file: