Monte-Carlo integration question
- To: mathgroup at smc.vnet.net
- Subject: [mg66641] Monte-Carlo integration question
- From: "Yaroslav Bulatov" <yaroslavvb at gmail.com>
- Date: Thu, 25 May 2006 02:58:17 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
When I set MaxPoints to 10, I expect integration time complexity to not
depend much on the number of dimensions. But the time taken seems to
increase exponentially without bound, and a simple 50 dimensional
integration problem (with MaxPoints=10) has been running for over a
week, why such behaviour?
<< Statistics`MultinormalDistribution`
(* Compute E[||X||] for d-dimensional Gaussian *)
ev[d_] := Module[{ndist, params, pdf, intlimits, norm},
ndist = MultinormalDistribution[Table[0, {d}], IdentityMatrix[d]];
params = (Subscript[x, #1] & ) /@ Table[i, {i, 1, d}];
pdf = PDF[ndist, params];
intlimits = Sequence @@ ({Subscript[x, #1], -Infinity, Infinity} & ) /@
Table[i, {i, 1, d}];
norm = Sqrt[Plus @@ (#1^2 & ) /@ params];
NIntegrate[norm*pdf, Evaluate[intlimits], Method -> QuasiMonteCarlo,
MaxPoints -> 10]]
For[i = 1, i = 10, Print[{i, Timing[ev[i]]}]; i++]
Yaroslav