# Joint Probability Density Function where Y depends on X

Consider the following joint PDF:

$$f_{X,Y}(x,y)=\begin{cases} 1 & \text{if } 0

I am able to visualize the figure in 3 dimensions as a triangle at height 1 spanning $$y=-1$$ to $$1$$ and $$x=0$$ to $$1$$. I am trying to study the properties of this PDF, such as conditional expectation, marginal PDF, etc., and I am having a really tough time properly setting up the integrals. Specifically, I want to know $$E[Y|X]$$ and the marginal PDFs $$f_X(x)$$, $$f_y(y)$$, so that I can study the unconditional expectations and covariance. I am frustrated because I cannot visualize what is going on when I compute these objects. Any hints would be very helpful.

Examine the support.

We have $$0 and $$-x, exactly when, $$\lvert y\rvert < x < 1$$ and, $$-1.

\large\begin{align}f_{X,Y}(x,y) &=\mathbf 1_{x\in(0,1), y\in(-x,x)}\\[1ex] &=\mathbf 1_{y\in(-1,1), x\in (\lvert y\rvert,1)}\end{align}

So \begin{align}f_X(x) &=\int_{(-x,x)} \mathbf 1_{x\in(0,1)}~\mathrm d y\\[2ex]f_Y(y)&=\int_{(\lvert y\rvert,1)}\mathbf 1_{y\in(-1,1)}~\mathrm d x\end{align}

am frustrated because I cannot visualize what is going on when I compute these objects.

The support is a triangle, $$\triangle\langle 0,0\rangle\langle 1,-1\rangle\langle 1,1\rangle$$.

The marginal density for $$X$$ at some $$x\in(0,1)$$ integrates over the vertical lines, where $$y$$ ranges from $$-x$$ to $$x$$. Since the joint density is uniform over the triangle, the marginal is proportional to the length of these lines: $$2x$$. -- smallest near the origin, widest near the opposite base

The marginal density for $$Y$$ at some $$y\in(-1,1)$$ integrates over the horizontal lines, where $$x$$ ranges from $$\lvert y\rvert$$ to $$1$$. Since the joint density is uniform over the triangle, the marginal is proportional to the length of these lines: $$1-\lvert y\rvert$$. -- smallest near the tips, largest near the central axis.

Oh, and it should be clear what $$\mathsf E(Y\mid X)$$ equals.

• Thank you so much for your help. The absolute value was throwing me off. I am able to visualize $f_X(x)$ and $f_Y(y)$ now. I believe we have: $E(Y|X)=0$, $Cov(X,Y)=0$, and $X,Y$ are independent. Jul 17, 2019 at 0:22
• $X,Y$ are surely not independent, the value of one does constrain the value of the other. $\mathsf{Cov}(X,Y)=0$ merely means the variables are uncorrelated. Jul 17, 2019 at 0:26
• To be independent you need $f_{X,Y}(x,y)=f_X(x)f_Y(y)$ for all $x,y$. Jul 17, 2019 at 0:31
• Yes, of course... Clearly $2x(1-|y|)\neq 1$, so they are not independent. Jul 17, 2019 at 1:13