views:

291

answers:

1

Considering I have a continuous joint distribution of two independent normal random variables (let's assume the independent vars are on the X and Z axis, and the dependent - the joint probability - is on the Y axis), and I have a line anywhere on the XZ plane, how would I compute the probability of a point falling on one side or the other of that line?

+4  A: 

First move everything so that the two normal distributions (the X and the Z) are centered on zero; now the joint ditribution will be a hill centered on the origin.

Now scale one of the axes so that the two distributions have the same variance (or "width"). Now the joint probability should be a rotationally symmetric hill.

Now all that matters is how close the line comes to the origin. Rotate about the origin (this will leave the joint probability unchanged) until the line is parallel to one of the axes, say Z. Now you're asking for the probability that a random point will have X greater or less than the X-value of the line. That's determined by one of the scaled ditribution functions (they're the same), and can be calculated by means of the error function.

I can write out the math if that would be useful.

EDIT: I'll try to write out the last step. Pardon my crude ascii, I don't have access to a good math tablet.

Suppose we've scaled and centered the distributions so that sigmaX = sigmaZ = 1, and rotated everything:

joint probability: P(x, z) = 1/(2 pi) exp(-(x^2 + z^2)/2)

line: x = c

Now to find the probability that a random point will be on a narrow "vertical" strip between some x and x+dx:

P(x)dx = Int[z=-Inf, z=+Inf]{dz P(x, z)}
       = 1/sqrt(2 pi) exp(-x^2/2) 1/sqrt(2 pi) Int[z=-Inf, z=+Inf]{dz exp(-z^2/2)}
       = 1/sqrt(2 pi) exp(-x^2/2)

But that's the same as (either) one of the two normal distributions. So the probability that a random point will be, say, to the left of the line is

P(c>x) = Int[-Inf, c]{dx 1/sqrt(2 pi) exp(-x^2/2)}
       = 1/2 (1 - Erf(c/sqrt(2)))
Beta
Fabio Ceconello
I'd appreciate if you could post the formulae for just this last step. Empirically it seemed to me that in order to "flatten" one of the dimensions you'd need to combine the two functions, because I supposed the corresponding curve would be steeper.
Fabio Ceconello
I believe you've interpreted the consequence of Beta's answer correctly in your first comment; due to symmetry considerations, the translated and scaled joint distribution is preserved by rotation, as is the shortest distance from the line to the origin. Furthermore, any 2-D cross-section of the translated and scaled joint distribution will itself be a single-variable normal distribution. So, yes, if you set the limits as described, this works. Of course, remove the word "normal" from your question, and all bets are off. :-)
Richard Dunlap
In answer to the question, yes, you can calculate the distance from line to origin and use that as the integration limit. I just used rotation to make it clear (I hope) why this works.
Beta
Thanks. I asked because in my specific case this would make the implementation more time-efficient, since I already had the distance previously calculated for another use.
Fabio Ceconello
Just be sure you calculate the distance AFTER the scaling.
Beta