SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdistmulti.MultiNormalDist Class Reference

Implements the abstract class ContinuousDistributionMulti for the multinormal distribution with mean vector \(\boldsymbol{\mu}\) and covariance matrix \(\boldsymbol{\Sigma}\). More...

Inheritance diagram for umontreal.ssj.probdistmulti.MultiNormalDist:
umontreal.ssj.probdistmulti.ContinuousDistributionMulti

Public Member Functions

double density (double[] x)
 Returns \(f(x_1, x_2, …, x_d)\), the probability density of \(X\) evaluated at the point \(x\), where \(x = \{x_1, x_2, …, x_d\}\).
double[] getMean ()
 Returns the mean vector of the distribution, defined as \(\mu_i = E[X_i]\).
double[][] getCovariance ()
 Returns the variance-covariance matrix of the distribution, defined as
\(\sigma_{ij} = E[(X_i - \mu_i)(X_j - \mu_j)]\).
double[][] getCorrelation ()
 Returns the correlation matrix of the distribution, defined as.
int getDimension ()
 Returns the dimension \(d\) of the distribution.
double[] getMu ()
 Returns the parameter \(\boldsymbol{\mu}\) of this object.
double getMu (int i)
 Returns the \(i\)-th component of the parameter.
double[][] getSigma ()
 Returns the parameter \(\boldsymbol{\Sigma}\) of this object.
void setParams (double[] mu, double[][] sigma)
 Sets the parameters \(\boldsymbol{\mu}\) and.

Static Public Member Functions

static double density (double[] mu, double[][] sigma, double[] x)
 Computes the density ( fMultinormal ) of the multinormal distribution with parameters.
static double[] getMean (double[] mu, double[][] sigma)
 Returns the mean \(E[\mathbf{X}] = \boldsymbol{\mu}\) of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and.
static double[][] getCovariance (double[] mu, double[][] sigma)
 Computes the covariance matrix of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and \(\boldsymbol{\Sigma}\).
static double[][] getCorrelation (double[] mu, double[][] sigma)
 Computes the correlation matrix of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and \(\boldsymbol{\Sigma}\)).
static double[] getMLEMu (double[][] x, int n, int d)
 Estimates the parameters \(\boldsymbol{\mu}\) of the multinormal distribution using the maximum likelihood method.
static double[][] getMLESigma (double[][] x, int n, int d)
 Estimates the parameters \(\boldsymbol{\Sigma}\) of the multinormal distribution using the maximum likelihood method.

Detailed Description

Implements the abstract class ContinuousDistributionMulti for the multinormal distribution with mean vector \(\boldsymbol{\mu}\) and covariance matrix \(\boldsymbol{\Sigma}\).

The probability density is

\[ f(\mathbf{x}) = \frac{1}{\sqrt{(2\pi)^d \det\boldsymbol{\Sigma}}} \exp\left(-\frac{1}{2}(\mathbf{x}- \boldsymbol{\mu})^T \boldsymbol{\Sigma}^{-1} (\mathbf{x}- \boldsymbol{\mu})\right) \tag{fMultinormal} \]

where \(\mathbf{x}= (x_1,…,x_d)\).

Definition at line 46 of file MultiNormalDist.java.

Member Function Documentation

◆ density() [1/2]

double umontreal.ssj.probdistmulti.MultiNormalDist.density ( double[] mu,
double sigma[][],
double[] x )
static

Computes the density ( fMultinormal ) of the multinormal distribution with parameters.

\(\boldsymbol{\mu}=\) mu and \(\boldsymbol{\Sigma}=\) sigma, evaluated at x.

Definition at line 99 of file MultiNormalDist.java.

◆ density() [2/2]

double umontreal.ssj.probdistmulti.MultiNormalDist.density ( double[] x)

Returns \(f(x_1, x_2, …, x_d)\), the probability density of \(X\) evaluated at the point \(x\), where \(x = \{x_1, x_2, …, x_d\}\).

The convention is that \(\mathtt{x[i-1]} = x_i\).

Parameters
xvalue at which the density is evaluated
Returns
density function evaluated at x

Reimplemented from umontreal.ssj.probdistmulti.ContinuousDistributionMulti.

Definition at line 58 of file MultiNormalDist.java.

◆ getCorrelation() [1/2]

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getCorrelation ( )

Returns the correlation matrix of the distribution, defined as.

\(\rho_{ij} = \sigma_{ij}/\sqrt{\sigma_{ii}\sigma_{jj}}\).

Reimplemented from umontreal.ssj.probdistmulti.ContinuousDistributionMulti.

Definition at line 87 of file MultiNormalDist.java.

◆ getCorrelation() [2/2]

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getCorrelation ( double[] mu,
double sigma[][] )
static

Computes the correlation matrix of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and \(\boldsymbol{\Sigma}\)).

Definition at line 177 of file MultiNormalDist.java.

◆ getCovariance() [1/2]

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getCovariance ( )

Returns the variance-covariance matrix of the distribution, defined as
\(\sigma_{ij} = E[(X_i - \mu_i)(X_j - \mu_j)]\).

Reimplemented from umontreal.ssj.probdistmulti.ContinuousDistributionMulti.

Definition at line 83 of file MultiNormalDist.java.

◆ getCovariance() [2/2]

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getCovariance ( double[] mu,
double sigma[][] )
static

Computes the covariance matrix of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and \(\boldsymbol{\Sigma}\).

Definition at line 153 of file MultiNormalDist.java.

◆ getDimension()

int umontreal.ssj.probdistmulti.MultiNormalDist.getDimension ( )

Returns the dimension \(d\) of the distribution.

Reimplemented from umontreal.ssj.probdistmulti.ContinuousDistributionMulti.

Definition at line 130 of file MultiNormalDist.java.

◆ getMean() [1/2]

double[] umontreal.ssj.probdistmulti.MultiNormalDist.getMean ( )

Returns the mean vector of the distribution, defined as \(\mu_i = E[X_i]\).

Reimplemented from umontreal.ssj.probdistmulti.ContinuousDistributionMulti.

Definition at line 79 of file MultiNormalDist.java.

◆ getMean() [2/2]

double[] umontreal.ssj.probdistmulti.MultiNormalDist.getMean ( double[] mu,
double sigma[][] )
static

Returns the mean \(E[\mathbf{X}] = \boldsymbol{\mu}\) of the multinormal distribution with parameters \(\boldsymbol{\mu}\) and.

\(\boldsymbol{\Sigma}\).

Definition at line 140 of file MultiNormalDist.java.

◆ getMLEMu()

double[] umontreal.ssj.probdistmulti.MultiNormalDist.getMLEMu ( double x[][],
int n,
int d )
static

Estimates the parameters \(\boldsymbol{\mu}\) of the multinormal distribution using the maximum likelihood method.

It uses the

\(n\) observations of \(d\) components in table \(x[i][j]\), \(i = 0, 1, …, n-1\) and \(j = 0, 1, …, d-1\).

Parameters
xthe list of observations used to evaluate parameters
nthe number of observations used to evaluate parameters
dthe dimension of each observation
Returns
returns the parameters [ \(\boldsymbol{\mu}_1\),…, \(\boldsymbol{\mu}_d\)]

Definition at line 198 of file MultiNormalDist.java.

◆ getMLESigma()

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getMLESigma ( double x[][],
int n,
int d )
static

Estimates the parameters \(\boldsymbol{\Sigma}\) of the multinormal distribution using the maximum likelihood method.

It uses the \(n\) observations of \(d\) components in table

\(x[i][j]\), \(i = 0, 1, …, n-1\) and \(j = 0, 1, …, d-1\).

Parameters
xthe list of observations used to evaluate parameters
nthe number of observations used to evaluate parameters
dthe dimension of each observation
Returns
returns the covariance matrix \(\boldsymbol{\Sigma}\)

Definition at line 229 of file MultiNormalDist.java.

◆ getMu() [1/2]

double[] umontreal.ssj.probdistmulti.MultiNormalDist.getMu ( )

Returns the parameter \(\boldsymbol{\mu}\) of this object.

Definition at line 258 of file MultiNormalDist.java.

◆ getMu() [2/2]

double umontreal.ssj.probdistmulti.MultiNormalDist.getMu ( int i)

Returns the \(i\)-th component of the parameter.

\(\boldsymbol{\mu}\) of this object.

Definition at line 267 of file MultiNormalDist.java.

◆ getSigma()

double[][] umontreal.ssj.probdistmulti.MultiNormalDist.getSigma ( )

Returns the parameter \(\boldsymbol{\Sigma}\) of this object.

Definition at line 274 of file MultiNormalDist.java.

◆ setParams()

void umontreal.ssj.probdistmulti.MultiNormalDist.setParams ( double[] mu,
double sigma[][] )

Sets the parameters \(\boldsymbol{\mu}\) and.

\(\boldsymbol{\Sigma}\) of this object.

Definition at line 283 of file MultiNormalDist.java.


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