I have three independent random variables, each from a normal distribution with zero mean, but respective variances.
x1 ~ N(0,s1)
x2 ~ N(0,s2)
x3 ~ N(0,s3)
I need to find the joint probability: P(x1+x3>0, x2-x3 >0)
My approach has been to form functions of the random variables, create a joint distribution and then find the probabilities. However, I'm having difficulty coding this correctly in Matlab. Any thoughts?
My functions of random variables:
y1 = x1+x3
y2 = x2-x3
y3 = x3 % included because I need as many equations as unknowns
x1 = y1-y3
x2 = y2-y3
x3 = y3
The Jacobian of the transformation is equal to 1.
fY = 1/((2*pi)^(3/2)*det(SIGMA)^(1/2))*exp(-0.5*Y'*inv(SIGMA)*Y),
where Y = [y1-y3, y2-y3, y3] and SIGMA = [s1,0,0; 0,s2,0; 0,0,s3]
Now I need to compute P(y1>0, y2>0). Any ideas? Best practices? Thanks!
You can use matlab's 'integral3' function with numerical integration taken with respect to y1, y2, and y3. Your limits of integration would be:
y1min = 0, y1max = inf, y2min = 0, y2max = inf, y3min = -inf, y3max = inf
Your Jacobian is 1 so you don't have to include it in the integrand. The integrand would be obtained by substituting in your joint density function using x1, x2, and x3, the corresponding y1, y2, and y2 values in accordance with the transformation you have worked out. Note however that your equation for x2 is incorrect and should be
x2 = y2+y3
and not the one you have written.