# Can someone check my work for this joint denisty function problem

## Homework Statement

X and Y have uniform joint density function:

f(x,y)= d (constant) for 0<x<1 and 0<y<1-x

1. find d

2. find p(y<x)

3. find cov (x,y)

## The Attempt at a Solution

1. For this I first graphed x=1 and y=1 and created a square since x can go from 0 to a maximum of 1 and y also. I then graphed y=1-x. The area of the bottom triangle is what I want. That is 1/2. So i then do a double integral (x goes from 0 to 1 and y goes from 0 to 1-x) of (c dy dx). This should equal 1/2. I get 1/2 c equals 1/2, so c=1. Is that correct?

2. For the p(y<x), I graphed y=x and you get two triangles within the larger one. We want the area of the lower one. We could get this through simple geometry or by using integrals. If you want to use integrals, you have to split the triangle into half and you get a right triangle and a left one.

Area of left one is

Double integral (x goes form 0 to 1/2 and y goes from 0 to x) of 1, which is 1/8

Area of right one is:

Double integral (x goes from 1/2 to 1 and y goes from 0 to 1-x) of 1, which is also 1/8

So the area of the triangle is 1/8+1/8 which is 1/4. This is p(y<x)

3. Cov(x,y)= E(xy)-E(x)E(y)

I got that E(xy) is 1/24

E(x)=1/6
E(y)=1/6

So Cov(x,y) is 1/72.

Can someone please tell this poor, hopeless soul if these answers are even close to being correct.

Related Calculus and Beyond Homework Help News on Phys.org
lanedance
Homework Helper
for 1) so you set up the integral as
$$\int dx dy f(x,y) =\int_0^1 dx \int_0^{1-x} dy f(x,y) =d \int_0^1 dx \int_0^{1-x} dy$$

so you can either integrate or note that the area of the triangle is 1/2, this is what the integral without the d term above will return. Then as this is the cumulative probabilty, it means d=2 as the total probabilty to find x,y in the gievn interval must be 1

lanedance
Homework Helper
for 2, the geometric solution is easiest, aren't your 2 triangles symmetric, making the probability 1/2

lanedance
Homework Helper
for 3, consider the centroids of the main triangle (once again can do by integral but geomtric reasoning will be simpler)

when only considering one direction, the area above must balance the area below
E(x) = E(y) = 1/3

E(xy) will correspond to the centre of mass of the triangle