# Limits of Integration When Finding Marginal PDF

My question is about the same exercise problem asked here. I had a different question though regarding it, and decided to ask my own question.

More specifically, I keep seeming to have trouble understanding how we set the limits of integration when it comes to PDF's. For anyone who doesn't want to click the link, here's the problem in question:

Let the random variables X and Y have a joint PDF which is uniform over the triangle with vertices at $$(0,0)$$, $$(0,1)$$ and $$(1,0)$$.

I understand that the triangle is confined by the boundaries $$(0 \le x \le 1)$$, $$(0 \le y \le 1)$$, and $$(x + y \le 1)$$.

When we are finding the marginal PDF of $$X$$, the integral is as follows:

\begin{align} f_X{(x)} & = \int_{y = 0}^{y = -x + 1}2dy \\ & = -2x + 2 \end{align}

My understanding of this integral and the limits that we set is that because our focus is on the values of $$x$$, so to speak, for any specific value of $$x$$ we want to integrate all of the corresponding values of $$y$$ in order to get the marginal value. However, for any chosen value of $$x$$ the highest we can go is the line $$y = -x + 1$$, which gives us our upper bound.

Is my understanding correct?

If so, by the same logic and switching our focus to the $$y$$-axis, could we find the marginal PDF of $$Y$$ as

\begin{align} f_Y(y) & = \int_{x = 0}^{x = -y + 1}2dx \\ \end{align}

, which gives us $$f_Y(y) = -2y + 2$$?

Any feedback is appreciated. Thank you.

• It looks good to me. – BGM Nov 20 '18 at 9:05
• You're right on both counts. The marginal pdfs are correct – Sauhard Sharma Nov 25 '18 at 3:35