# 2-Dimensional random variable probability

## Homework Statement

Hi, at the moment I am trying to revise for my Probability exam, and a couple of the questions on the past paper are as follows, however I can find nothing in our notes that is of any use! Any help would be greatly appreciated, thankyou.

i) Two random variables X and Y have density function:

f$$_{X,Y}$$(x,y) = axy$$^{2}$$ if 0$$\leq$$x$$\leq$$1, 0$$\leq$$y$$\leq$$1 and 0 otherwise
Determine the constant a such that f is a density function.

ii)Let (X,Y) be a random vector with density function:

f$$_{X,Y}$$(x,y) = 6x , if 0<x<y<1 , 0 otherwise
Compute Cov(X,Y) and $$\rho$$(X,Y) , where $$\rho$$ is the correlation.

## The Attempt at a Solution

i) For this one I'm not entirely sure what to do here. I feel I should integrate it to give me the pdf, F, but then I don't know what to do with it. What condition should it satisfy that I can impose to give me a set value for 'a'?

ii)For this, I know that the formula for Covariance is E[(X-E[X])(Y-E[Y])] and that the correlation is $$\frac{Cov(X,Y)}{\sqrt{Var(X)Var(Y)}}$$
So does that mean that Cov(X,Y) is just E[g(X,Y)] with g(X,Y) equalling X and Y respectively?
In which case E[X] is just the integral of the density function multiplied by x (or y) as in the 1 dimensional case?
(You may have noticed I had a moment of inspiration halfway through writing this, but have carried on as I am not sure if my inspiration is correct!)

OK Having thought about it some more I have figured out the following:
i)
since the pdf (I realise that f is the pdf, and F is the cdf, not as I wrote before) is only defined for x on [0,1] and y on [0,1] and that for the definition of pdf I need to integrate everywhere they are defined and set equal to one. So doubly integrate between 0 and 1 both times, the function ax(y^2) dxdy and set equal to one to get a value of a=6, yes?
(I now need to determine P(Y<X) , P(Y<X^2), P(max(X,Y)>=0.5) which I am now slightly lost on, though...)

ii)OK To find E[X] and E[Y] I need to know the marginal probabilities f(x) and f(y). I know the formulas for these are f(x) = integral over y (f(x,y) dy) and similar for y.
I have worked out that the region 0<x<y<1 is described by the line y=1-x (and verified that $$\int$$$$^{1}_{0}$$$$\int$$$$^{1-x}_{0}$$6x dy dx = 1, so this is right)
So now how do I find f(x) and f(y)?

If I am right in saying that to find f(x) and f(y) just integrate over the range of where it is defined, with respect to the other variable. Ie. f(x) = (integral between 1 and 0) of 6x dy = 6x
and f(y) = (integral between 1 and 0) of 6x dx = 3
Now to find E[X] I do = (integral between 0 and 1) x*6x dx = 2 ??

If this is all true, then the covariance is now E[(X-2)(Y-1.5)]. How on earth do you work that out??