# Double integration with normal distribution

by nowoman
Tags: distribution, double, integration, normal
 P: 9 1. The problem statement, all variables and given/known data Given X and Y are independent, normal distribution variable. a and b are constants. 2. Relevant equations The probability of P(X+Y
PF Gold
P: 1,776
 Quote by nowoman 1. The problem statement, all variables and given/known data Given X and Y are independent, normal distribution variable. a and b are constants. 2. Relevant equations The probability of P(X+Y

Yes there is but you need to convert the area integral into polar coordinates. Actually you could probabily solve the problem geometrically if you can visualize the area over which you are integrating and take into account the symmetry.

I have assumed in answering you that the two variables are both unit normal distributions with zero mean. Remember that:
$$\exp\left(\frac{x^2}{2\sigma^2}\right)\exp\left(\frac{y^2}{2\sigma^2}\r ight) = \exp\left(\frac{x^2+y^2}{2\sigma^2}\right) = \exp(r^2/2\sigma^2)$$

So it's symmetric under rotations about the origin!!!
HW Helper
P: 1,362
 Quote by jambaugh Yes there is but you need to convert the area integral into polar coordinates. Actually you could probabily solve the problem geometrically if you can visualize the area over which you are integrating and take into account the symmetry. I have assumed in answering you that the two variables are both unit normal distributions with zero mean. Remember that: $$\exp\left(\frac{x^2}{2\sigma^2}\right)\exp\left(\frac{y^2}{2\sigma^2}\r ight) = \exp\left(\frac{x^2+y^2}{2\sigma^2}\right) = \exp(r^2/2\sigma^2)$$ So it's symmetric under rotations about the origin!!!
Note that the exponents in the previous reply should have negative signs in them - for example

$$\exp \left(\frac{-x^2}{2\sigma^2}\right)$$

and so on throughout.

Also, the original poster did not state this, but this assumes that $$X \text{ and } Y$$ are identically distributed. If they are not this become much more difficult.

On a side thought, have you tried a transformation? You can write down the joint density of the two quantities. Now try

\begin{align*} S & = X + Y \tag{S for sum}\\ T & = X \tag{Your other variable} \end{align*}

You have $$-\infty < S, T < \infty$$. Find the jacobian and obtain the joint density of $$S \text{ and } T$$. Setting up the double integral after will give the same answer as the other suggested method. I haven't gone through the work to see whether one is easier than the other.

 P: 9 Double integration with normal distribution Thanks to both of you. I am glad to see your replies. But I still doubt the methods are feasible to solve the problem. We can see, P(X+Y
HW Helper
Thanks
P: 26,157
 Quote by nowoman BTW, how tex my codes?
Hi nowoman! Welcome to PF!

For:

$$P(X+Y<b,X<a)\ =\ \int_{-\infty}^{a}f(x)\int_{-\infty}^{b-x}f(y)\,dxdy =\int_{-\infty}^{a}f(x)\,erf(b-x)\,dx$$

you have to put $$before, and$$ after …

$$P(X+Y<b,X<a)\ =\ \int_{-\infty}^{a}f(x)\int_{-\infty}^{b-x}f(y)\,dxdy =\int_{-\infty}^{a}f(x)\,erf(b-x)\,dx$$

(also, as you see, "\ " gives you large spaces, and "\," gives you small spaces )
 P: 9 Thanks for your information, tiny-tim. I have a bit more thoughts bout the problem. $$P(X+Y  P: 9 If we let U and V are standard normal distributions, we have [tex] P(U+V<0, U<0)=\int_{A}f(u,v)dA=\int_{3\pi /4}^{3\pi /2}\int_{0}^{\infty} f(r cos(\theta),rsin(\theta))rdrd\theta=\int_{3\pi /4}^{3\pi /2}\int_{0}^{\infty} f(r cos(\theta)) f(rsin(\theta))rdrd\theta=3/8$$ Does anyone verify me?
 Sci Advisor PF Gold P: 1,776 Pardon my error, I somehow assumed that a and b were zero so that the area over which the integration occured was an angular wedge with vertex at the origin. My point about symmetries is not very helpful. This is a much more involved problem than I first assumed. You may disregard my post.
 P: 9 Thanks. Yes, I think if U and V are standard normal distribution, the problem is easy to solve. If U and V are general normal distributions, it is still very hard to solve. Any ideas?
 Sci Advisor PF Gold P: 1,776 In looking at it further I'm pretty sure there is no closed form solution.
 P: 9 yes. Do you have ideas how to get an approximate solution that is computable and accurate enough for general purpose? Thanks
PF Gold
P: 1,776
 Quote by nowoman yes. Do you have ideas how to get an approximate solution that is computable and accurate enough for general purpose? Thanks
My first thought is to use Monte Carlo methods. Find a good normal random number generator. Have it generate pairs (x,y) and count how many satisfy the condition
$$x+y<b,\quad x< a$$. Divide by the number of tials.

See http://www.taygeta.com/random/gaussian.html abotu generating normal distribution random numbers.

Also recall that a binomial distribution approaches the gaussian as the number of trials increases so you might be able to scale the problem to be approximated by a sum over a double binomial distribution which might be computationally quicker via integer arithmetic.

Beyond that there's just the standard numerical integration packages. You might try transforming to variables with simple boundaries such as U>0, V>0. Put all the messy into the p.d.f.

That's all I got for now.
 P: 9 Hi jambaugh, Thanks for much for your suggestions. The problem is actually a subroutine of a larger problem. The larger problem frequently refer to this problem. Hence, Monte Carlo method may be too expensive to implement it. Thanks though.
PF Gold
P: 1,776
 Quote by nowoman Hi jambaugh, Thanks for much for your suggestions. The problem is actually a subroutine of a larger problem. The larger problem frequently refer to this problem. Hence, Monte Carlo method may be too expensive to implement it. Thanks though.
How precise does the value need to be?

You might look at Gaussian Quadrature methods which allow you to get good estimates by evaluating at a few specific points.

Also remember you're dealing with effectively a function of two variables (a,b). You can always pre-calculate a select set of (a,b) points in a data table and then use interpolation, extrapolation in the subroutine.

What's this for anyway?
 P: 9 Thanks, jambaugh. I'll have a look at these methods. Thanks for the long discussion with you. Take care!

 Related Discussions Set Theory, Logic, Probability, Statistics 2 Set Theory, Logic, Probability, Statistics 2 Calculus & Beyond Homework 3 Calculus & Beyond Homework 2 Set Theory, Logic, Probability, Statistics 3