Multivariate Normal Distribution
Contents
Multivariate Normal Distribution¶
Time series model¶
a specification of the joint distribution of
Gaussian time series model¶
probability density:
where
is the mean of the random vectorand
is the covariance matrix of
The joint, marginal and conditional distributions¶
Marginal¶
Bivariate Normal¶
where:
Example:
case 1
rho=.9
sigma1 = 1
sigma2 = 1
mu1=0
mu2=0
y2 = 1
(
mu1 + (y2 - mu2)*(rho*sigma1*sigma2)/(sigma2**2),
1 - (rho*sigma1*sigma2)**2/(sigma2**2)
)
(0.9, 0.18999999999999995)
If
Information about
Reduction of the uncertainty about
case 2
rho=.1
sigma1 = 1
sigma2 = 1
mu1=0
mu2=0
y2 = 1
(
mu1 + (y2 - mu2)*(rho*sigma1*sigma2)/(sigma2**2),
1-(rho*sigma1*sigma2)**2/(sigma2**2)
)
(0.1, 0.99)
If
Reduction of the uncertainty about
Let
Then
therefore,
Conditional (in)dependence¶
Two random variables
If
More generally,
And the conditional correlation between
also known as partial correlation between
Example 1
then
therefore,
Example 2
then
therefore,
from statsmodels.tsa.arima_process import arma_acovf
from scipy.linalg import toeplitz
import numpy as np
acov1 = arma_acovf(ar=[1, -.4], ma=[1], nobs=10, sigma2=1)
Sigma1 = toeplitz(acov1)
acov2 = arma_acovf(ar=[1,], ma=[1, .3], nobs=10, sigma2=1)
Sigma2 = toeplitz(acov2)
print(np.linalg.inv(Sigma1[:3][:,:3]).round(4))
print(np.linalg.inv(Sigma2[:3][:,:3]).round(4))
[[ 1. -0.4 0. ]
[-0.4 1.16 -0.4 ]
[ 0. -0.4 1. ]]
[[ 0.9993 -0.2976 0.0819]
[-0.2976 1.0812 -0.2976]
[ 0.0819 -0.2976 0.9993]]
Missing values¶
Suppose we have a Gaussian model for
but some elements of
are not observed, i.e. we observe a vector
for example
Some examples¶
mixed frequency
(univariate) GDP at annual, GDP at quarterly
(multivariate) GDP at annual, inflation at monthly
etc.
forecasting
backcasting
unobserved (latent) variables
state of the economy
natural rates (interest, unemployment)
economic shocks
observed elements , unobserved elements ¶
- jointly Gaussianmarginal distribution of
example:
conditional distribution of
given
if
- optimal forecast of given - variance of the optimal forecast
where optimality is in the sense of minimizing the MSE
in general,