Finding $f_X(x)$ and $f_{X,Y}(x,y)$ given $f_{X_1,X_2}(x_1,x_2)$ where $X_1=X+Y$ and $X_2=X-Y$

173 Views Asked by At

Let $X$ and $Y$ be two random variables. Suppose $X_1=X+Y$ and $X_2=X-Y$. If the joint density function of $(X_1,X_2)$ is given by $$f_{X_1,X_2}(x_1,x_2)=\frac{1}{2\pi\sqrt{3}}e^{-\frac{1}{2}\Big(\frac{(x_1-4)^2}{3}+(x_2-2)^2\Big)} \ \ \ \ \ x_1,x_2\in\mathbb{R}$$ Compute the joint density function $f_{X,Y}(x,y)$.

My attempt:

$$f_{X,Y}(x,y)=f_{X_1,X_2}(x_1,x_2)\frac{1}{|det(J)|}$$ where $$det(J)=\begin{vmatrix} \frac{\partial x}{\partial x_1} & \frac{\partial x}{\partial x_2} \\ \frac{\partial y}{\partial x_1} & \frac{\partial y}{\partial x_2} \\ \end{vmatrix}=\begin{vmatrix} \frac{1}{2} & \frac{1}{2} \\ \frac{1}{2} & -\frac{1}{2} \ \end{vmatrix}=-\frac{1}{2}$$ Hence$$f_{X,Y}(x,y)=\frac{1}{\pi\sqrt{3}}e^{-\frac{1}{2}\Big(\frac{(x+y-4)^2}{3}+(x-y-2)^2\Big)} \ \ \ \ \ x,y\in\mathbb{R}$$

Compute the marginal density function $f_X(x)$

Assuming my above working is correct, this is my attempt. I does not feel correct, but I can't see any errors. $$f_X(x)=\int_{-\infty}^{\infty}\frac{1}{\pi\sqrt{3}}e^{-\frac{1}{2}\Big(\frac{(x+y-4)^2}{3}+(x-y-2)^2\Big)} dy=-\frac{3}{ \pi\sqrt{3}}\Bigg[\frac{1}{(2x-4y-2)e^{\frac{1}{2}\Big(\frac{(x+y-4)^2}{3}+(x-y-2)^2\Big)}}\Bigg]_{-\infty}^{\infty}=0$$

2

There are 2 best solutions below

5
On BEST ANSWER

An extended comment:

You have the joint density of $(X_1,X_2)$ given by

$$f_{X_1,X_2}(x_1,x_2)=\frac{1}{\sqrt{3}\sqrt{2\pi}}\exp\left[-\frac{1}{2}\cdot\frac{(x_1-4)^2}{3}\right]\cdot\frac{1}{\sqrt{2\pi}}\exp\left[-\frac{(x_2-2)^2}{2}\right]\qquad,(x_1,x_2)\in\mathbb R^2$$

So it follows that $X_1$ and $X_2$ are independently distributed with $X_1\sim\mathcal N(4,3)$ and $X_2\sim\mathcal N(2,1)$. (The second parameter denotes variance as is often the case).

From the change of variables you are given, $$X=\frac{X_1+X_2}{2}$$ and $$Y=\frac{X_1-X_2}{2}$$

By the reproductive property of normal distribution, we know that $X\sim\mathcal N(3,1)$ and $Y\sim\mathcal N(1,1)$.

Further, $X$ and $Y$ being linear combinations of jointly normal variables $X_1$ and $X_2$ ($X_1,X_2$ being independent normal variables implies they are themselves jointly normal), their joint distribution is bivariate normal. A relatively simple proof of this fact follows from moment generating functions.

To be precise, the joint distribution of $(X,Y)$ would be of the form $\mathcal N(\mu,\Sigma)$, where $\mu=\begin{pmatrix}3\\1\end{pmatrix}$ is the mean vector and $\Sigma=\begin{pmatrix}1&-1\\-1&1\end{pmatrix}$ is the dispersion matrix.

While we can make out the final answer before doing any actual work, you have to prove this using the transformation of variables. The procedure as you have attempted is straightforward and you seem to know what needs to be done. I have included the answer for you to check with your results.

2
On

There is definitely an error in the last calculation. Since you are integrating something that is positive but you obtain $0$. The general approach in solving this integral goes as follows. Collect all $y$ terms, split the square for $y$. Now, you have a squared term in $y$ and some other terms in $x$ (and constants). Get the $x$ terms outside of the integral and recognize a Gaussian density inside the integral. Finally, find the constants related to the Gaussian density and you are done.

If you have any questions, or if you want a solution where this is written out, feel free to comment. I chose to do it this way such that you could think about this before reading the solution!

Edit: I haven't checked any of your calculations, but this is the method to solve the integral: (please forgive any small calculation errors I made here (I didn't check it), the idea of this solution is to present how you should solve this integral, not per se the exact solution)

$$ f_X(x) = \int_{-\infty}^{\infty}f_{X,Y}(x,y)\,\mathrm{d}y=\int_{-\infty}^{\infty}\frac{1}{\pi\sqrt{3}}e^{-\frac{1}{2}\Big(\frac{(x+y-4)^2}{3}+(x-y-2)^2\Big)}\,\mathrm{d} y \\ = \frac{1}{\pi\sqrt{3}} \int_{-\infty}^{\infty} e^{-\frac{1}{2}\left(\frac{1}{3}x^2 + \frac{1}{3} y^2 + \frac{16}{3} + \frac{2}{3} xy - \frac{8}{3}x - \frac{8}{3} y + x^2 + y^2 + 4 - 2xy - 4x+4y\right)}\,\mathrm{d} y \\ =\frac{1}{\pi \sqrt{3}}\int_{-\infty}^{\infty} e^{-\frac{1}{2}\left(\frac{4}{3}x^2 + \frac{4}{3} y^2 + \frac{28}{3} - \frac{4}{3} xy - \frac{20}{3}x + \frac{4}{3} y \right)}\,\mathrm{d} y \\ = \frac{1}{\pi\sqrt{3}} e^{-\frac{2}{3}x^2 - \frac{14}{3}+\frac{10}{3}x}\int_{-\infty}^{\infty} e^{-\frac{1}{2}\left(\frac{4}{3} y^2 - \left(\frac{4}{3} x + \frac{4}{3}\right) y \right)}\,\mathrm{d} y \\ = \frac{1}{\pi\sqrt{3}} e^{-\frac{2}{3}x^2 - \frac{14}{3}+\frac{10}{3}x}\int_{-\infty}^{\infty} e^{-\frac{1}{2}\cdot\frac{4}{3}\left(y^2 - \left(x + 1\right) y \right)}\,\mathrm{d} y \\ = \frac{1}{\pi\sqrt{3}} e^{-\frac{2}{3}x^2 - \frac{14}{3}+\frac{10}{3}x}\int_{-\infty}^{\infty} e^{-\frac{1}{2}\cdot\frac{4}{3}\left(\left(y - \left(x + 1\right)/2\right)^2 - (x+1)^2/4 \right)}\,\mathrm{d} y \\ = \frac{1}{\pi\sqrt{3}} e^{-\frac{2}{3}x^2 - \frac{14}{3}+\frac{10}{3}x + \frac{1}{2}\cdot\frac{4}{3}(x+1)^2/4}\int_{-\infty}^{\infty} e^{-\frac{1}{2}\cdot\frac{4}{3}\left(\left(y - \left(x + 1\right)/2\right)^2 \right)}\,\mathrm{d} y $$ Now, note that the integral that you have left is the integral over an unnormalized Gaussian density (mean is equal to $(x+1)/2$ and variance is equal to $3/4$. Hence, the last integral is equal to $\sqrt{2\pi\cdot\frac{3}{4}}$. If you plug this in, and simplify the expression even further, you should get a Gaussian density for $X$. Could you continue from here?