# How to find the marginal densities of the given functions

The fraction $$X$$ of male runners and the fraction $$Y$$ of female runners who compete in marathon races are described by the joint density function$$f(x,y) = \begin{cases} 8xy & 0 \le x \le y \le1 \\ 0 & \mbox{elsewhere,} \end{cases}$$

Find the covariance of $$X$$ and $$Y$$ .

I know the formula as $$σ_{xy}=E(XY ) − μ_Xμ_Y$$

And the given solution is as follows

We first compute the marginal density functions. They are

$$g(x) = \begin{cases} 4x^3 & 0 \le x \le1 \\ 0 & \mbox{elsewhere.} \end{cases}$$

and $$h(y) = \begin{cases} 4y(1 − y^2) & 0 \le y \le1 \\ 0 & \mbox{elsewhere.} \end{cases}$$

My Question:

How did they get $$g(x)$$ and $$h(y)$$?

Did they use $$\int_0^1 f(x,y)$$ dy and $$\int_0^1f(x,y)dx$$?

• Please add the self-study tag and expand on the difficulties you have with notions like marginal densities and covariance of continuous variables. In particular explain why you did not try to compute $\int_0^1 f(x,y)\text{d}x = h(y)$ Commented Nov 8, 2018 at 18:44
• See this answer for some details about the marginal density can be derived from the joint density. Commented Nov 8, 2018 at 19:13

## 1 Answer

Since your joint is non-zero when $$x\leq y$$, $$h(y)=\int_0^{y}{f(x,y)dx}$$. And, it appears that your $$h(y)$$ is not true, PDF of Y should be $$f_Y(y)=g(y)$$. Or the initial condition should be $$y\leq x$$. Anyway, after finding marginals, you calculate the means. And for $$E[XY]$$, you'll just perform a joint integration by respecting the limits.