[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multivariate student t: normalization in mvtrnd
From: |
Daniel J Sebald |
Subject: |
Re: Multivariate student t: normalization in mvtrnd |
Date: |
Mon, 26 Nov 2012 16:44:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 11/26/2012 04:06 PM, Iñigo Urteaga wrote:
Dear all,
I am using the mvtrnd function provided in the statistics package for
octave and I have encountered some inconsistent results that I do not
comprehend.
From theory, we know that if Z is a standard Student's t random vector
and we define X as a linear combination (i.e. X=Sigma * Z), the
resulting variable X is a multivariate Student's t distribution with
covariance matrix Var(X)=nu/(nu-2)*V, where V=Sigma * Sigma'.
In fact, when we define a V and sample from the following expression,
where Sigma=chol(V), n is the dimensionality, nu the degrees of
freedom and M the number of samples:
samples=Sigma' * mvtrnd( eye(n), nu, M)'; (1)
the covariance computed from those samples (i.e. cov(samples) )
matches the expected variance nu/(nu-2)*V.
However, if we directly apply:
samples=mvtrnd(V, nu); (2)
Just a quick response on first thoughts without diving too deep...
http://octave.sourceforge.net/statistics/function/mvtrnd.html describes
the function where it appears "sigma" is correlation coefficients.
Sigma is typically a variable associated with standard deviation and
sigma^2 variance. You've defined V=Sigma * Sigma' which is more along
the lines of variance, not standard deviation. If that first input is
to be scaling factor, perhaps what you want is
samples=mvtrnd(sqrt(V), nu);
See if that produces something more in line with nu/(nu-2) scaling
factor for the variance.
Dan
then, the covariance computed does not match nu/(nu-2)*V, but the
alternative expression using the correlation matrix R: nu/(nu-2)*R.
Here, R is the correlation matrix as computed by
R=V./(sqrt(diag(V)*diag(V))). The mvtrnd code indicates that the
provided V is normalized if diagonal elements are non-unit, but I
don't understand why this is required. In fact, sampling from the
multivariate normal (mvnrnd called within the function) actually
performs Cholesky decomposition of the provided V to accommodate non
unitary covariance matrices.
As I understand it, both approaches (1) and (2) should provide the
same result (and that is the case if no normalization is performed).
Since this is not the case, I was wondering what is the underlying
reason for that normalization step. Am I missing something here or is
this normalization step in mvtrnd unnecessary?
I would truly appreciate some help/hints here.
Thank you very much in advance,
Iñigo Urteaga
--
Dan Sebald
email: daniel(DOT)sebald(AT)ieee(DOT)org
URL: http://www(DOT)dansebald(DOT)com