Message Boards Message Boards

0
|
3140 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Find the probability of a Joint distribution function given by an integral?

Hello all, I was trying to find the probability of a Joint distribution function given by the following double integral but was unable to get the right value $$ P = \int_{-\infty}^{\infty} \int_{-\infty}^{y+2.6} f_{X,Y}(x,y) dx dy = 0.9467$$ where $$ f_{X,Y}(x,y) = \frac{1}{A} \exp^{-\frac{1}{2}(x^2+y^2+2rxy)} $$ for $ r = 0.23 $ ; $ \{X,Y\}\in Real $ and $X - Y \leq 2.6$

I was trying the following script

    r     =  0.23; 
    fxy   = (1/A)*Exp[(-1/2)*(x^2 + y^2 + 2*r*x*y)];
    Inum  = Integrate[fxy, {x, -Infinity, y + 2.6}, {y, -Infinity, Infinity}];
    Aval  = NSolve[Inum == 1, A];
    fxy   = fxy /. Aval;
    P     =  Integrate[fxy, {x, -Infinity, y + 2.6}, {y, -Infinity, Infinity}]

for which I got the output shown below enter image description here

I will appreciate if anyone can help me figure out the issue here to get the exact value of P as given above. Thanks in advance.

POSTED BY: Ashfiq Rahman
2 Replies
Posted 5 years ago

One thing you'll need to do is to reverse the order of {x, -Infinity, y + 2.6} and {y, -Infinity, Infinity}:

r = 23/100;
fxy = Exp[(-1/2)*(x^2 + y^2 + 2*r*x*y)];

(* Get constant of integration *)
A = Integrate[fxy, {y, -Infinity, Infinity}, {x, -Infinity, Infinity}];

(* Now integrate over -Infinity < x < y + 2.6 < Infinity *)
NIntegrate[(1/A) fxy, {y, -Infinity, Infinity}, {x, -Infinity, y + 26/10}]
(* 0.946656 *)
POSTED BY: Jim Baldwin

It worked !!! Thanks a lot Jim.

POSTED BY: Ashfiq Rahman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract