umontreal.iro.lecuyer.probdistmulti
Class DiscreteDistributionIntMulti
- java.lang.Object
-
- umontreal.iro.lecuyer.probdistmulti.DiscreteDistributionIntMulti
-
- Direct Known Subclasses:
- MultinomialDist, NegativeMultinomialDist
public abstract class DiscreteDistributionIntMulti extends java.lang.ObjectClasses 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
Constructors Constructor and Description DiscreteDistributionIntMulti()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description doublecdf(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)].intgetDimension()Returns the dimension d of the distribution.abstract double[]getMean()Returns the mean vector of the distribution, defined as μi = E[Xi].abstract doubleprob(int[] x)Returns the probability mass function p(x1, x2,…, xd), which should be a real number in [0, 1].
-
-
-
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. computesF(x1, x2,…, xd) = ∑s1=0x1∑s2=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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG