Marginal distribution of a Gaussian

Click For Summary
SUMMARY

The discussion centers on the marginal distributions of two random variables, X and Y, with a joint probability distribution defined by f_{XY}(x,y)= \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] }. The marginal distributions f_X(x) and f_Y(y) are confirmed to be Gaussian, with means μ_X and μ_Y, and variances σ_X^2 and σ_Y^2, respectively. The discussion also highlights the simplification of calculations through variable transformations, specifically U = \frac{X - \mu_X}{\sigma_X} and V = \frac{Y - \mu_Y}{\sigma_Y}.

PREREQUISITES
  • Understanding of joint probability distributions
  • Knowledge of Gaussian distributions and their properties
  • Familiarity with integration techniques, particularly for exponential functions
  • Ability to perform variable transformations in probability theory
NEXT STEPS
  • Study the properties of Gaussian distributions in detail
  • Learn about the covariance matrix and its implications in multivariate distributions
  • Explore integration techniques for exponential functions, particularly in the context of probability
  • Investigate the use of change of variables in simplifying complex integrals
USEFUL FOR

Students and professionals in statistics, data science, and fields involving probability theory, particularly those working with multivariate Gaussian distributions and their applications.

fluidistic
Gold Member
Messages
3,932
Reaction score
283

Homework Statement


The random variables X and Y have a joint probability distribution of f_{XY}(x,y)= \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}.
Where rho, sigma's and mu's are constants.
Show that the marginal distributions are also Gaussians. Calculate their mean value and their variance.

Homework Equations


a)The marginal distribution of the variable X is f_ X (x)=\int _{-\infty}^{\infty} f_{XY}(x,y)dy.
b)The marginal distribution of the variable Y is f_Y(y)=\int _{-\infty}^{\infty} f_{XY}(x,y)dx.
c)\int _{-\infty}^{\infty} e^{-ax^2+bx }dx=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{4a}}.
d)For the mean values I need to calculate \int f_X(x)xdx and \int f_Y(y)ydy which in my case is so horrible that I've lost some hope in it.

The Attempt at a Solution


So my problem resides in calculating that huge integral. I've done it 3 times, each time reaching a different result, but I've spotted an error in my first 2 attempts and didn't in my last attempt though the result is so ugly I can't believe I've done it right.
So in order to perform \int _{-\infty}^{\infty} f_{XY}(x,y)dy, I factorize outside the integral the constant \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \{ \left [ - \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{x-\mu _X}{\sigma _X} \right ) \}.
Therefore I am left to calculate the integral \int _{-\infty}^{\infty} \exp \{ \left [ - \frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{y-\mu _Y}{\sigma _Y} \right ) ^2 - \frac{2\rho (x-\mu _X )(y- \mu _Y)}{\sigma _X \sigma _Y} \right ] \} dy.
I skip many steps (latex is very long to write!) but what I did was rewrote the argument of the exponential into a form -ax^2+bx+c and where a = \frac{1}{2(1-\rho ^2) \sigma _Y ^2}, b= \frac{\mu _Y}{\sigma _Y ^2(1-\rho ^2)} - \frac{\rho \mu _X}{\sigma _X \sigma _Y (1-\rho ^2)} + \frac{2\rho x}{\sigma _X \sigma Y} and c= \left [ \frac{1}{2(1-\rho ^2)} \right ] \left [ \frac{2\rho \mu _X \mu _Y}{\sigma _X \sigma _Y}-\frac{2\rho x \mu _Y}{\sigma _X \sigma _Y} -\frac{\mu _Y ^2}{\sigma _Y ^2} \right ].
This gave me as a final result, f_X(x)= \frac{1}{\sqrt {2\pi} \sigma _X} \exp \{ x^2 \left [ \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{4 \rho ^2 -1 }{\sigma _X ^2} \right ) +x \left [ \frac{1}{2(1-\rho ^2)} \left ( \frac{2\rho \mu _Y }{\sigma _X \sigma _Y}-\frac{4 \rho ^2 \mu _X}{\sigma _X ^2}+\frac{2\mu _X}{\sigma _X ^2} \right ) \right ] +\left [ \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{\rho ^2 \mu _X ^2}{\sigma _X ^2}- \frac{\mu _X ^2}{\sigma _X ^2} \right ) \}. This would be my answer to the first question. For the marginal distribution of the random variable Y, I'd have to change all x's by y's and all X's by Y's in that result, because the joint distribution is totally symmetric with respect to x-y/X-Y.
As you can see my answer is under the form Ae^{ax^2+bx+c} so I think this implies it's a Gaussian?
I would like to know whether my result is good and how can I calculate the mean of that function; I mean there must be a trick or something because the integral to perform looks much uglier than the first!
Thanks for any help!
 
Physics news on Phys.org
Yikes, I haven't read through all of your equations to check their validity because, as you said, it's pretty ugly. I think you can simplify this problem quite a bit using this change of variables:

U = \frac{X - \mu_X}{\sigma_X}
V = \frac{Y - \mu_Y}{\sigma_Y}

Then it's easy to find the marginal distributions, means, and variances for X and Y if you have found these things for U and V.
 
fluidistic said:

Homework Statement


The random variables X and Y have a joint probability distribution of f_{XY}(x,y)= \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}.
Where rho, sigma's and mu's are constants.
Show that the marginal distributions are also Gaussians. Calculate their mean value and their variance.

Homework Equations


a)The marginal distribution of the variable X is f_ X (x)=\int _{-\infty}^{\infty} f_{XY}(x,y)dy.
b)The marginal distribution of the variable Y is f_Y(y)=\int _{-\infty}^{\infty} f_{XY}(x,y)dx.
c)\int _{-\infty}^{\infty} e^{-ax^2+bx }dx=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{4a}}.
d)For the mean values I need to calculate \int f_X(x)xdx and \int f_Y(y)ydy which in my case is so horrible that I've lost some hope in it.

The Attempt at a Solution


So my problem resides in calculating that huge integral. I've done it 3 times, each time reaching a different result, but I've spotted an error in my first 2 attempts and didn't in my last attempt though the result is so ugly I can't believe I've done it right.
So in order to perform \int _{-\infty}^{\infty} f_{XY}(x,y)dy, I factorize outside the integral the constant \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \{ \left [ - \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{x-\mu _X}{\sigma _X} \right ) \}.
Therefore I am left to calculate the integral \int _{-\infty}^{\infty} \exp \{ \left [ - \frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{y-\mu _Y}{\sigma _Y} \right ) ^2 - \frac{2\rho (x-\mu _X )(y- \mu _Y)}{\sigma _X \sigma _Y} \right ] \} dy.
I skip many steps (latex is very long to write!) but what I did was rewrote the argument of the exponential into a form -ax^2+bx+c and where a = \frac{1}{2(1-\rho ^2) \sigma _Y ^2}, b= \frac{\mu _Y}{\sigma _Y ^2(1-\rho ^2)} - \frac{\rho \mu _X}{\sigma _X \sigma _Y (1-\rho ^2)} + \frac{2\rho x}{\sigma _X \sigma Y} and c= \left [ \frac{1}{2(1-\rho ^2)} \right ] \left [ \frac{2\rho \mu _X \mu _Y}{\sigma _X \sigma _Y}-\frac{2\rho x \mu _Y}{\sigma _X \sigma _Y} -\frac{\mu _Y ^2}{\sigma _Y ^2} \right ].
This gave me as a final result, f_X(x)= \frac{1}{\sqrt {2\pi} \sigma _X} \exp \{ x^2 \left [ \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{4 \rho ^2 -1 }{\sigma _X ^2} \right ) +x \left [ \frac{1}{2(1-\rho ^2)} \left ( \frac{2\rho \mu _Y }{\sigma _X \sigma _Y}-\frac{4 \rho ^2 \mu _X}{\sigma _X ^2}+\frac{2\mu _X}{\sigma _X ^2} \right ) \right ] +\left [ \frac{1}{2(1-\rho ^2)} \right ] \left ( \frac{\rho ^2 \mu _X ^2}{\sigma _X ^2}- \frac{\mu _X ^2}{\sigma _X ^2} \right ) \}. This would be my answer to the first question. For the marginal distribution of the random variable Y, I'd have to change all x's by y's and all X's by Y's in that result, because the joint distribution is totally symmetric with respect to x-y/X-Y.
As you can see my answer is under the form Ae^{ax^2+bx+c} so I think this implies it's a Gaussian?
I would like to know whether my result is good and how can I calculate the mean of that function; I mean there must be a trick or something because the integral to perform looks much uglier than the first!
Thanks for any help!

I don't want to spoil your fun, but the mere fact that the parameters have names like μX and σX, etc., should be a hint that the final answer is pretty simple. All I can say is that if you do the y-integration very carefully and completely, the formula for fX(x) comes out pleasantly uncomplicated.

RGV
 
jbunniii said:
Yikes, I haven't read through all of your equations to check their validity because, as you said, it's pretty ugly. I think you can simplify this problem quite a bit using this change of variables:

U = \frac{X - \mu_X}{\sigma_X}
V = \frac{Y - \mu_Y}{\sigma_Y}

Then it's easy to find the marginal distributions, means, and variances for X and Y if you have found these things for U and V.
Wow. Wow. Wow. Worked like a charm, thanks a lot!
Ray Vickson said:
I don't want to spoil your fun, but the mere fact that the parameters have names like μX and σX, etc., should be a hint that the final answer is pretty simple. All I can say is that if you do the y-integration very carefully and completely, the formula for fX(x) comes out pleasantly uncomplicated.

RGV
Haha, "my fun". Yeah you are right, I was execting a friendler result that the one I obtained, but I must say it's even simpler than what I thought. Thanks a lot guys, problem solved (99% sure). I'm too exhausted to post the full answer right now. If anyone care, just ask me and I'll post it.
 
fluidistic said:
Wow. Wow. Wow. Worked like a charm, thanks a lot!

Nice! Glad it worked out. I still remember the day as an undergraduate when I had sweated through some similarly horrible thing, and then the teaching assistant goes over the solution and says "well, first of all, let's make this problem easier by changing the variables..."
 
fluidistic said:
Wow. Wow. Wow. Worked like a charm, thanks a lot!

Haha, "my fun". Yeah you are right, I was execting a friendler result that the one I obtained, but I must say it's even simpler than what I thought. Thanks a lot guys, problem solved (99% sure). I'm too exhausted to post the full answer right now. If anyone care, just ask me and I'll post it.

Yes, please post it.

BTW: your initial post gave a wrong formula for fX(x).

RGV
 
Ray Vickson said:
Yes, please post it.

BTW: your initial post gave a wrong formula for fX(x).

RGV

Here are my results: f_X(x)=\frac{1}{\sqrt{2\pi} \sigma _X} \exp \left [ -\frac{1}{2} \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 \right ].
f_Y(y)=\frac{1}{\sqrt{2\pi} \sigma _Y} \exp \left [ -\frac{1}{2} \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 \right ].
Mean of f_X(x), \langle X \rangle = \mu _X.
Mean of f_Y(y), \langle Y \rangle = \mu _Y.
Furthermore, \langle X ^2 \rangle = \mu _X ^2+ \sigma _X ^2 and \langle Y ^2 \rangle = \mu _Y ^2+ \sigma _Y ^2 so that the variances are \text{var} (f_X(x))= \sigma _X^2 and \text{var} (f_Y(y))= \sigma _Y^2.
I must also get the covariance matrix which involves calculating the term \langle XY\rangle = \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} f(x,y)xydxdy. I guess I must look at an integral table to do \int f_{XY} (x,y)xdx.
 
fluidistic said:
Here are my results: f_X(x)=\frac{1}{\sqrt{2\pi} \sigma _X} \exp \left [ -\frac{1}{2} \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 \right ].
f_Y(y)=\frac{1}{\sqrt{2\pi} \sigma _Y} \exp \left [ -\frac{1}{2} \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 \right ].
Mean of f_X(x), \langle X \rangle = \mu _X.
Mean of f_Y(y), \langle Y \rangle = \mu _Y.
Furthermore, \langle X ^2 \rangle = \mu _X ^2+ \sigma _X ^2 and \langle Y ^2 \rangle = \mu _Y ^2+ \sigma _Y ^2 so that the variances are \text{var} (f_X(x))= \sigma _X^2 and \text{var} (f_Y(y))= \sigma _Y^2.
I must also get the covariance matrix which involves calculating the term \langle XY\rangle = \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} f(x,y)xydxdy. I guess I must look at an integral table to do \int f_{XY} (x,y)xdx.

These are the correct marginals, etc.

To calculate ## E[(X-\mu_X)(Y - \mu_Y)]## you do not need to use integration tables. The first step would be to simplify everything by following previous suggestions, and use variables
Z_1 = \frac{X - \mu_X}{\sigma_X}, \; Z_2 = \frac{Y - \mu_Y}{\sigma_Y}. The function
f_{Z_1 Z_2}(z1,z2) \equiv g(z_1,z_2) is much, much simpler than the original, and then all you need to do is calculate
\int_{-\infty}^{\infty}\, \int_{-\infty}^{\infty} z_1 z_2 g(z_1,z_2) \, dz_1 \, dz_2. It is fairly easy to do the z2 integral first, then do the z1 integral. Both integrals just rely on already-known values of gaussian integrals.

RGV
 
Last edited:
Ray Vickson said:
These are the correct marginals, etc.

To calculate ## E[(X-\mu_X)(Y - \mu_Y)]## you do not need to use integration tables. The first step would be to simplify everything by following previous suggestions, and use variables
Z_1 = \frac{X - \mu_X}{\sigma_X}, \; Z_2 = \frac{Y - \mu_Y}{\sigma_Y}. The function
f_{Z_1 Z_2}(z1,z2) \equiv g(z_1,z_2) is much, much simpler than the original, and then all you need to do is calculate
\int_{-\infty}^{\infty}\, \int_{-\infty}^{\infty} z_1 z_2 g(z_1,z_2) \, dz_1 \, dz_2. It is fairly easy to do the z2 integral first, then do the z1 integral. Both integrals just rely on already-known values of gaussian integrals.

RGV
Thanks for helping me again. I don't really understand how the change of variable could be helpful nor why what you wrote holds. Nor do I understand why the z_2 integral is easier than the z_1 first, to me they look absolutely symmetric, so the same algebra. I also do not see how we get rid of an integral of the type \int x e^{x^2}dx.
 
  • #10
fluidistic said:
Thanks for helping me again. I don't really understand how the change of variable could be helpful nor why what you wrote holds. Nor do I understand why the z_2 integral is easier than the z_1 first, to me they look absolutely symmetric, so the same algebra. I also do not see how we get rid of an integral of the type \int x e^{x^2}dx.

Do whichever one you want first, but pick one and do it first. Why change variables? Because it is 100 times easier to do it in z1,z2 than in x,y. However, it is absolutely NOT NECESSARY: just use the original form if you like doing lots of work and have lots of spare time.

RGV
 
  • #11
Ok I don't have that much time and I'd rather use the change of variables.
Please correct me where I'm wrong:
f_{Z_1Z_2}(z_1,z_2)=\frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ].
The first integral would be \int _{-\infty}^{\infty} \frac{z_1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ] dz_1. Is this correct so far?
 
  • #12
fluidistic said:
Ok I don't have that much time and I'd rather use the change of variables.
Please correct me where I'm wrong:
f_{Z_1Z_2}(z_1,z_2)=\frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ].
The first integral would be \int _{-\infty}^{\infty} \frac{z_1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ] dz_1. Is this correct so far?

It is OK if you eliminate σX and σY in the denominator. The change of variable gets rid of the σ, because dz1 = dx/σX, etc.

RGV
 
Last edited:
  • #13
Ray Vickson said:
It is OK if you eliminate σX and σY in the denominator. The change of variable gets rid of the σ, because dz1 = dx/σX, etc.

RGV
Ok I understand, this is what I thought at first but then... I don't understand the integral.
Since z_1=\frac{x-\mu _X}{\sigma _X} the integral \int _{-\infty}^{\infty} \frac{z_1}{2\pi \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ] dz_1 (1) is not equivalent to the integral \int _{-\infty}^{\infty }\frac{x}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \} dx (2).
Oh wait, so it would mean that (2) is equivalent to (1) -\frac{f_Y(y)\mu_X}{x}?
 
  • #14
fluidistic said:
Ok I understand, this is what I thought at first but then... I don't understand the integral.
Since z_1=\frac{x-\mu _X}{\sigma _X} the integral \int _{-\infty}^{\infty} \frac{z_1}{2\pi \sigma _Y \sqrt{1-\rho ^2}}\exp \left [ -\frac{1}{2 (1-\rho ^2)} (z_1 ^2 +z_2 ^2-2\rho z_1 z_2 ) \right ] dz_1 (1) is not equivalent to the integral \int _{-\infty}^{\infty }\frac{x}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \} dx (2).
Oh wait, so it would mean that (2) is equivalent to (1) -\frac{f_Y(y)\mu_X}{x}?

What on Earth are you talking about? Just get rid of the denominator ##\sigma_X \sigma_Y## in your (z1,z2) integral. Have you never studied changes of variables in integration?

RGV
 
  • #15
Ray Vickson said:
What on Earth are you talking about? Just get rid of the denominator ##\sigma_X \sigma_Y## in your (z1,z2) integral. Have you never studied changes of variables in integration?

RGV
I have studied change of variables in integration but I'm stuck at understanding the change of variable you use in post #8.
From what I understand you are saying that to simplify the computation of \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \frac{xy}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy it is equivalent to calculate \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} z_1z_2g(z_1,z_2)dz_1dz_2 but if you replace z_1 and z_2 by \frac{x-\mu _X}{\sigma _X} and \frac{y-\mu _Y}{\sigma _Y} respectively, then you get \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} z_1z_2g(z_1,z_2)dz_1dz_2= \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \left ( \frac{x-\mu _X}{\sigma _X} \right ) \left ( \frac{y-\mu _Y}{\sigma _Y} \right ) \cdot \frac{1}{2 \pi \sqrt{1-\rho ^2}} \cdot \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy. Clearly this is not equal to what we started with, namely \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \frac{xy}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy.
I know I'm missing something but I don't know what.
 
  • #16
fluidistic said:
I have studied change of variables in integration but I'm stuck at understanding the change of variable you use in post #8.
From what I understand you are saying that to simplify the computation of \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \frac{xy}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy it is equivalent to calculate \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} z_1z_2g(z_1,z_2)dz_1dz_2 but if you replace z_1 and z_2 by \frac{x-\mu _X}{\sigma _X} and \frac{y-\mu _Y}{\sigma _Y} respectively, then you get \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} z_1z_2g(z_1,z_2)dz_1dz_2= \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \left ( \frac{x-\mu _X}{\sigma _X} \right ) \left ( \frac{y-\mu _Y}{\sigma _Y} \right ) \cdot \frac{1}{2 \pi \sqrt{1-\rho ^2}} \cdot \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy. Clearly this is not equal to what we started with, namely \int _{-\infty}^{\infty} \int _{-\infty}^{\infty} \frac{xy}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}} \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] \left [ \left ( \frac{x-\mu _X}{\sigma _X} \right )^2 + \left ( \frac{y-\mu _Y}{\sigma _Y} \right )^2 -\frac{2\rho (x-\mu _X)(y-\mu _Y)}{\sigma _X \sigma _Y} \right ] \}dxdy.
I know I'm missing something but I don't know what.

This will be absolutely the last time I respond.
(1) What is the relation between Cov(X,Y) and Cov(Z1,Z2)?
(2) What is the formula for Cov(Z1,Z2)?
(3) The density ##f_{Z_1,Z_2}(z_1,z_2) \equiv g(z_1,z_2)## should not have any parameters ##\sigma_X, \; \sigma_Y## in it, but it will still contain ##\rho.##

RGV
 
  • #17
Hey guys I'm still stuck on this problem; if someone could push me a little further I'd be happy.
Ray Vickson said:
This will be absolutely the last time I respond.
Okay no problem
(1) What is the relation between Cov(X,Y) and Cov(Z1,Z2)?
I don't know. :frown:
(2) What is the formula for Cov(Z1,Z2)?
I don't know either. I'm asked to find the covariance matrix, namely \begin{bmatrix} &lt;X^2&gt;-&lt;X&gt;^2 &amp;&lt;YX&gt;-&lt;Y&gt;&lt;X&gt; \\ &lt;XY&gt;-&lt;X&gt;&lt;Y&gt; &amp; &lt;Y^2&gt;-&lt;Y&gt;^2 \end{bmatrix}; I've all the terms except <XY>=<YX> and this is where I'm stuck.
(3) The density ##f_{Z_1,Z_2}(z_1,z_2) \equiv g(z_1,z_2)## should not have any parameters ##\sigma_X, \; \sigma_Y## in it, but it will still contain ##\rho.##

RGV
Yes I noticed this, that's because the dz_i's contain a \sigma _x dx and \sigma _y dy.
 
  • #18
Ok I've made more progresses thanks to Ray Vickson's last post.
I didn't realize that the coefficient I'm looking for in the matrix, namely &lt;XY&gt;-&lt;X&gt;&lt;Y&gt; is the covariance between X and Y (yes I'm a total newbie I know).
More than this, the covariance between X and Y is definied as cov(x,y)=\iint dxdy (x-\mu _X)(y-\mu _Y)f_{XY}(x,y). I was not taught this, that's why nothing clicked in my mind.
So now I UNDERSTAND why the change of variable z_i=\frac{x_i-\mu _i}{\sigma _i} works!
I can answer your question now Ray Vickson: cov(x,y)=\sigma _X \sigma _Y cov(z_1,z_2).
I have that cov(z_1, z_2)=\iint \sigma _X \sigma _Y dz_1 dz_2 z_1 z_2 \sigma _X \sigma _Y \cdot \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \{ \left [ -\frac{1}{2(1-\rho^2)} \right ] (z_1^2+z_2^2-2 \rho z_1 z_2) \}.
So that cov(z_1,z_2)=\frac{\sigma _X \sigma _Y}{2\pi \sqrt{1-\rho ^2}} \int _{-\infty}^{\infty}\int _{-\infty}^{\infty} z_1 z_2 \exp \{ \left [ -\frac{1}{2(1-\rho ^2)} \right ] (z_1^2+z_2^2 -2\rho z_1 z_2 \}.
So I can concentrate on the integral of z_1 first.
I have it under the form \int _{-\infty}^{\infty} z_1 \exp (-az_1^2+bz_1)dz_1 where a=\frac{1}{2(1-\rho ^2 )} and b=\frac{\rho z_2}{1-\rho ^2}.
I'm having troubles solving this integral. I tried by parts by calling u=z_1, v&#039;=\exp (-az_1^2+bz_1) so that u&#039;=1 and v=\frac{1}{2} \sqrt {\frac{\pi}{a}} erf \left ( \frac{2a z_1 -b}{2 \sqrt a} \right ) e^{b^2/(4a)}.
And so that integral is worth uv \big | _{-\infty}^{\infty} - \int _{-\infty}^{\infty} vdu.
First huge problem: uv evaluated in infinities is infinite, because the erf function is worth -1 at -infinity and 1 at infinity but the u part (z_1) is not finite there. Hence the integral diverges... which is I know, wrong.
Second big problem, I don't know a primitive of the erf function.

Ray Vickson said there is no need to look at integral tables and that it's fairly easy to solve (post #8). I do not see any substitution that could help me and integral by parts shows that it's divergent (I don't know where lies my error) while it's not.
Any help would be appreciated.
 
  • #19
I'm totally lost guys and exhausted.
I could solve the integral of the last post.
At the end I reached that \iint \sigma _X \sigma _Y dz_1 dz_2 z_1 z_2 \sigma _X \sigma _Y \cdot \frac{1}{2\pi \sigma _X \sigma _Y \sqrt{1-\rho ^2}}\exp \{ \left [ -\frac{1}{2(1-\rho^2)} \right ] (z_1^2+z_2^2-2 \rho z_1 z_2) \} = \sigma _X \sigma _Y \rho \frac{(1-\rho ^2 )^{3/2}}{[1-/(1-\rho ^2) \rho ^2]^{3/2}}. It's almost obvious I made at least one error somewhere and that I should have reached \sigma _X \sigma _Y \rho. I know this is worth cov(X,Y) and I thought it was worth cov (Z_1, Z_2) but I don't think it's true now.
I don't know the relation between cov (X, Y) and cov (Z_1, Z_2).
 
  • #20
Hi guys! I've finnally reached the desired result! (1 min ago!)
I reached cov(x,y)=\sigma _X \sigma _Y \rho. I just had to be extremely careful and solve 2 "nasty" integrals (one with a very "tough" trick, i.e. rewriting of the integral into something to make a u substitution and the other by parts).
Problem solved.
 

Similar threads

Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
987
  • · Replies 10 ·
Replies
10
Views
2K
Replies
14
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K