Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.3K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problem with bivariate SurvivalFunction[..] and Probability[..]

Posted 10 years ago

Hi,

When computing a tail probability for a bivariate Normal distribution, I noticed a strange behaviour. Specifically, say (X,Y) is normally distributed with mean (0,0) and variance (2,2) and covariance -0.5, and estimate Probability(X > 20 and Y > 20). The following three methods should return the same answer, however only the third method seems to work..

\[CapitalSigma] = {{2, -0.5}, {-0.5, 2}};
Dis = MultinormalDistribution[{0, 0}, \[CapitalSigma]];

Surv1[u_] := N[SurvivalFunction[Dis, {u, u}]];
Surv2[u_] := NProbability[X > u && Y > u, {X, Y} \[Distributed] Dis];
Surv3[u_] := NIntegrate[Boole[x > u && y > u]* PDF[Dis, {x, y}], {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \[Infinity]}];

Surv1[20] (* Returns 2.36319 x 10^{-91}  *)
Surv2[20] (* Returns 0 *)
Surv3[20] (* Returns 7.08202 x 10^{-120} *)

Just wondering if anyone had an explanation for this :) As an aside, it seems that the first method performs better when the covariance becomes positive.

Thanks,

Pat Laub.

POSTED BY: Patrick Laub
2 Replies
Posted 10 years ago

Ahh, thanks. I think it was indeed a silly oversight. I'm using 10.0, and "N[SurvivalFunction[Dis, {20, 20}], 20]" would return 2.36319*10^-91 however changing the covariance from -0.5 to -1/2 as you did gives the correct answer.

I'd thought the original differing behaviour meant that SurvivalFunction[..] was implemented in a different way to simply integrating the PDF, but the precise time when N[..] was applied must have been what was different.

Cheers! Pat.

POSTED BY: Patrick Laub

I'm not sure I understand. This looks like pretty standard floating point error. All the answers seem reasonable.

What version are you using? I get the same results for Surv2 and Surv3 with 10.4 on my machine.

If you want, you can use N as follows to get the right result:

sigma = {{2, -1/2}, {-1/2, 2}};
Dis = MultinormalDistribution[{0, 0}, sigma];  
N[SurvivalFunction[Dis, {20, 20}], 20]

7.0820200214939363143*10^-120
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard