MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Multivariate-T Simulation Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39009] Re: Re: [mg38986] Multivariate-T Simulation Problem
  • From: Kyriakos Chourdakis <tuxedomoon at yahoo.com>
  • Date: Fri, 24 Jan 2003 05:06:26 -0500 (EST)
  • Reply-to: k.chourdakis at qmul.ac.uk
  • Sender: owner-wri-mathgroup at wolfram.com

Dr. Bob,

It is true that anything can happen once, but this is
not the case since it is happening consistently.

In any way, when a sample of 10000 is drawn and the
degrees of freedom is so high [making all first
moments to exist and implying near normality], one
should not be so unlucky and get both variances wrong.

I am starting to think about the bug scenario...
I am using version 4.0 on WinME. If anyone with
similar specs could try it I would be grateful.

To find a path around the problem, I could try to use
univariate t-random numbers [which work fine] to
create the multivariate series, but I am not sure how.
Is the standard

X = rho Y + sqrt(1-rho^2) W

trick working when Y and W are [standardized]
t-distributed with df degrees of freedom ? My guess is
not since t=sqrt(Z1^2+...+Zdf^2). What would be the
correct way?

Best,

Kyriakos

====> Dr. Bob wrote <====
It's a SAMPLE variance, so almost anything can happen
ONCE.

I'm not getting sample variances anything like that,
though, so there could
be a bug in your version of Mathematica.  I'm using
version 4.2 with WinXP.

Also, you may as well look at the simulated covariance
matrix,
CovarianceMatrix@Transpose@ET, rather than just the
variance.

Bobby

On Thu, 23 Jan 2003 08:05:54 -0500 (EST),
KyriakosChourdakis
<tuxedomoon at yahoo.com> wrote:

> Dear all,
>
> I am trying to simulate a multivariate
t-distribution,
> and encounter the following problem:
>
> (* First load the packages *)
> <<Statistics`MultinormalDistribution`
> <<LinearAlgebra`MatrixManipulation`
>
> NS = 2; (* the number of series *)
> df = 20; (* the degrees of freedom - Since the
number
> is large, it should make the t similar to a normal
*)
>
> (* Create a random variance-covariance matrix *)
> rS0 = RandomArray[UniformDistribution[-0.30,
> 0.80],{NS, NS}];
> rS0 = rS0.Transpose[rS0];
> rS0 = (rS0/Max[rS0]) (1 - IdentityMatrix[NS]) +
IdentityMatrix[NS];
>
> (* the var-covar matrix is *)
> rS0
> {{1,         -0.290755},
> {-0.290755, 1        }}
>
> (* create 10000 draws of 2 dimensional vectors *)
> ET =
> Transpose[RandomArray[MultivariateTDistribution[rS0,
> df], 10000]];
>
> (* the theoretical cov matrix is ok, with
> var=df/[df-2]... *)
> ST =
N[CovarianceMatrix[MultivariateTDistribution[rS0,
> df]]]
> {{1.11111,  -0.323061}, {-0.323061,  1.11111}}
>
> (* ... But the simulated variance is not*)
> Mean /@ ET
> Variance /@ ET
> {-0.00426186, 0.00824351}
> {0.067534, 0.0670659}
>
> (* On the other hand, if I draw from the
corresponding
> multinormal *)
> EN =
Transpose[RandomArray[MultinormalDistribution[{0,
> 0}, ST], 10000]];
>
> (* Everything is OK *)
> Mean /@ EN
> Variance /@ EN
> {0.0196956, -0.00675908} (* Should be 0 *)
> {1.1362, 1.1099}         (* Should be 1.111 *)
>
> I cannot understand why the simulated variance is
> 0.067 instead of 1.111/[20-2]. Alternatively, why
> should I multiply all values with
sqrt(1.111/0.067)=4.
>
> Best,
>
> Kyriakos
>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
>



--
majort at cox-internet.com
Bobby R. Treat

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


  • Prev by Date: Re: Re: Integrating Abs[Sin[]^2]
  • Next by Date: Re: Multivariate-T Simulation Problem
  • Previous by thread: Re: Re: Re: Multivariate-T Simulation Problem
  • Next by thread: Re: Multivariate-T Simulation Problem