# Finding marginal pdf of a (X,Y) triangle

Let R be the triangle in the x−y plane with corners at (−1, 0),(0, 1) and (1, 0). Assume (X, Y ) is uniformly distributed over R, that is, X and Y have a joint density which is a constant c on R, and equal to 0 on the complement of R

What is c? Find c.

My thought is that c = $\frac{1}{2}$?

EDIT: c = $\frac{1}{2}\cdot 2 \cdot 1$

Also, what I know so far I think is right is that the right side of the triangle has equation y=-x +1 and the other equation should be y = x + 1 and they intersect at $(0,1)$. How can I use this to solve the question?

What is the marginal pdf X and Y? $$f_Y(y) = \int_\infty^\infty f(x,y) dx$$ $$f_X(x) = \int_\infty^\infty f(x,y) dy$$

For the triangle in the 1st quadrant (north east quadrant), x = 1-y

As for the triangle in the 2nd quadrant (north west quadrant), x = y-1 .

$$f_Y(y) = \int_{y-1}^{1-y} 1 dx$$

$$f_X(x) = \int_{-x+1}^{x+1} 1 dx$$ I don't exactly know how to insert the bounds onto the integral of $f_Y(y)$. If someone can explain it in layman's terms that would be great.

Would like some guidance to help me get started. Thank you

• What is the area of R? – Henry Apr 16 '16 at 0:07
• The area of the triangle is 1, and if you want uniform distribution, you need to have $c\cdot Area=1$. Still need to find the area, but it's the area of a triangle. – Nicholas Stull Apr 16 '16 at 0:07
• Indeed (typing more to let me reply) – Nicholas Stull Apr 16 '16 at 0:08
• if $c \cdot \text{Area} = 1$, then c = 2 – misheekoh Apr 16 '16 at 0:10
• $c$ should be $1$. (I know I typed $c=2$ once, but I misread where the third point was.) It's 1/2 base times height, and the height is 1, but the base is 2, so the area is 1. (sorry about that...) – Nicholas Stull Apr 16 '16 at 0:12

Draw a diagram.

Yes, $c=1$ because the area of the triangle is $1$, and the integral of $c$ over $R$ is $c$ times the area of $R$.

For the marginal density of $X$, we "integrate out" $y$. The density of $X$ is $0$ outside the interval $[-1,1]$. For inside the interval, the situation is a little different for $x\lt 0$ than it is for $x\ge 0$.

For $-1\le x\lt 0$, the upper boundary of the triangle is the line $y=x+1$. So the marginal density of $X$ is $\int_0^{x+1}1\cdot dy$, which is $x+1$.

For $0\le x\le 1$, the upper boundary is $y=-x+1$, so the marginal density of $X$ on $0\leq x\leq 1$ is $-x+1$.

The marginal density of $Y$ is calculated similarly. The marginal density is $0$ outside $[0,1]$. We now deal with $0\le y\le 1$.

We integrate out $x$. We are travelling from $y=x+1$ to $y=-x+1$, so $x$ travels from $y-1$ to $-y+1$. We find that on $0\le y\le 1$ the marginal density of $Y$ is $2-2y$.