Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.stat.math

Topic: joint normal distribution integral over the unit sphere
Replies: 11   Last Post: Sep 13, 2004 7:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ray Koopman

Posts: 2,132
Registered: 12/7/04
Re: joint normal distribution integral over the unit sphere
Posted: Sep 8, 2004 11:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Ray Koopman wrote:
>
> Here's some Mathematica code that seems to give 7-place accuracy.


Earlier today I posted a message very similar to the following,
but it seems to have gotten lost.

Here's some code that is simpler but more accurate than "vol",
and increasing PrecisionGoal will make it more accurate yet.

Experiments (not reported here) indicate that integrating w.r.t. r
seems to give more accurate results than integrating w.r.t. r^2,
even though the latter is simpler.

In[1]:= newvol[sx_,sy_,sz_] := With[{a = -.25(sx^-2 + sy^-2),
b = .25(sx^-2 - sy^-2)}, NIntegrate[r Exp[a*r^2] *
Erf[Sqrt[.5(1.-r^2)]/sz] BesselI[0,b*r^2],{r,0,1}]/(sx*sy)]

In[2]:= InputForm[ ColumnForm[ Map[ newvol[ Sequence@@#]&,
Permutations@{.3,.4,.5}]]]

Out[2]//InputForm=
0.8835309249169815
0.8835309249174408
0.8835309249169815
0.8835309249181131
0.8835309249174408
0.8835309249181131

In[3]:= With[{s = 1.3}, InputForm @ ColumnForm @
{1-GammaRegularized[ 3/2,.5/s^2],newvol[s,s,s]}]

Out[3]//InputForm=
0.10167383475354619
0.10167383475389877





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2010. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.