How to find E[X] of a multivariable joint PDF f(x,y)?

550 Views Asked by At

Question: X and Y  have the following joint probability density function. Find E[X]

$$f(x, y)= \frac{3}{620}y$$ $$0  <  x  <  7,  y  >  0,  x − 4  <  y  <  x + 4$$

My Approach:
To find the expectation of X, I first find the marginal pdf $f(x)$ by integrating y. Originally, my lower bound was $x-4$ but I changed it because if $x<4$, then $y<0$ which violates one of the constraints so:

$$\frac{3}{620}\int_{0}^{x+4}ydy = \frac{3}{620} \frac{(x+4)^2}{2} =\frac{3(x+4)^2}{1240}$$

Then, I find the expectation. I thought that the lower bound would be 4 instead of 0 as $x<4$ would not be possible for y:

$$E[X] = \int_{4}^{7}x*\frac{3(x+4)^2}{1240} dx = \frac{819}{1240} $$

However, this answer is incorrect and I'm having trouble figuring out why. If anyone can explain where I went wrong I would greatly appreciate it. Thank you!

2

There are 2 best solutions below

0
On BEST ANSWER

You are correct that the marginal density for $X$ is found by applying the formula $$f(x)=\int_y f(x,y) dy\tag1$$ but your limits of integration are wrong. If you plot the region where $f(x,y)$ is defined and nonzero, it's a truncated parallelogram in the $x,y$-plane. Specifically, it can be broken into two sub-regions (draw the picture!): $$ 0 < y < x+4\qquad\text{when $0< x< 4$} $$ and $$ x-4 < y < x+4\qquad\text{when $4< x< 7$}. $$ This means you need to break up the integral (1) into two pieces, corresponding to those two regions: $$ f(x) = \begin{cases} \int_0^{x+4} \frac3{620}y\,dy& \text{if $0< x<4$}\\ \int_{x-4}^{x+4} \frac3{620}y\,dy& \text{if $4< x<7$} \end{cases}\tag2 $$ In the end you'll have a marginal density for $X$ that's defined in two pieces. (Your calculation is just the first piece, for the case $0<x<4$.) Having obtained both pieces of (2) you then proceed to compute $E[X]=\int xf(x)\,dx$, again in two pieces: $$E[X]=\int_0^4 xf(x)\,dx + \int_4^7xf(x)\,dx$$

0
On

The key is that the supported $y$ must be such that for all $0\lt x\lt 7$ both these conditions hold: $0\lt y$ and $x-4\lt y\lt x+4$ .   This indicates that we should partition the domain at the $x = 4$ divide.

$$\begin{align}f(x,y) &= \dfrac{3y}{620}\mathbf 1_{\large 0\lt x\lt 7, \max\{0,x-4\}\lt y\lt x+4 }\\&=\dfrac{3y}{620}\left(\mathbf 1_{\large 0\lt x\lt 4, 0\lt y\lt x+4 }+\mathbf 1_{\large 4\leqslant x\lt 7,x-4\lt y\lt x+4 }\right)\\[4ex] \mathsf E(X)&=\iint_{\Bbb R^2} x\,f(x,y)\,\mathrm d\langle x,y\rangle\\&=\dfrac{3}{620}\left(\int_0^4 x\int_0^{x+4}y\,\mathrm d y\,\mathrm d x+\int_4^7 x\int_{x-4}^{x+4} y\,\mathrm d y\,\mathrm d x\right)\end{align} $$