SSJ
V. 2.6.

umontreal.iro.lecuyer.probdistmulti
Class DiscreteDistributionIntMulti

java.lang.Object
  extended by umontreal.iro.lecuyer.probdistmulti.DiscreteDistributionIntMulti
Direct Known Subclasses:
MultinomialDist, NegativeMultinomialDist

public abstract class DiscreteDistributionIntMulti
extends Object

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(x1, x2,…, xd) = P[X1 = x1, X2 = x2,…, Xd = xd] and the cumulative probabilities for a random vector X with a discrete distribution over the integers.


Constructor Summary
DiscreteDistributionIntMulti()
           
 
Method Summary
 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.
abstract  double[][] getCorrelation()
          Returns the correlation matrix of the distribution, defined as ρij = σij/(σ_iiσ_jj)1/2.
abstract  double[][] getCovariance()
          Returns the variance-covariance matrix of the distribution, defined as
σij = E[(Xi - μi)(Xj - μj)].
 int getDimension()
          Returns the dimension d of the distribution.
abstract  double[] getMean()
          Returns the mean vector of the distribution, defined as μi = E[Xi].
abstract  double prob(int[] x)
          Returns the probability mass function p(x1, x2,…, xd), which should be a real number in [0, 1].
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteDistributionIntMulti

public DiscreteDistributionIntMulti()
Method Detail

prob

public abstract double prob(int[] x)
Returns the probability mass function p(x1, x2,…, xd), which should be a real number in [0, 1].

Parameters:
x - value at which the mass function must be evaluated
Returns:
the mass function evaluated at x

cdf

public 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(x1, x2,…, xd) = ∑s1=0x1s2=0x2 ... sd=0xdp(s1, s2,…, sd).

Uses the naive implementation, is very inefficient and may underflows.


getDimension

public int getDimension()
Returns the dimension d of the distribution.


getMean

public abstract double[] getMean()
Returns the mean vector of the distribution, defined as μi = E[Xi].


getCovariance

public abstract double[][] getCovariance()
Returns the variance-covariance matrix of the distribution, defined as
σij = E[(Xi - μi)(Xj - μj)].


getCorrelation

public abstract double[][] getCorrelation()
Returns the correlation matrix of the distribution, defined as ρij = σij/(σ_iiσ_jj)1/2.


SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.