# Determining the domain for marginal distributions, expectations, and variances

I was hoping somebody could explain to me how you go about determining the domain for the marginal distribution, the marginal expectations, and the marginal variances. Here is the problem:

Let $f(x,y)= \left\lbrace \begin{matrix} 2 & 0\le y\le x \le 1 \\ 0 & otherwise \end{matrix} \right.$

Find $μ_x, \sigma^2_x,$ and $f(x)$.

I don't need somebody to solve this for me, as I already have the solution. However, I do not really understand how the domains of these three functions work. Of a similar vein, I do not understand which limits of integration to use at each step throughout the problem. Specifically, I'm trying to figure out:

1. When solving the integral for $f(x)=\int f(x,y)dy$, it is intuitive to me that you would integrate between $0$ and $x$. However, I do not understand why the domain for $f(x)$ is $0\le x \le 1$.
2. After you solve for the expected value of $x$, why is its domain $0\le x \le 1$?
3. What would the domain be for the variance of $x$? Is there an intuitive way to understand the domain for a marginal variance where the original function's domain for $x$ depends on $y$ (and vice versa), such as this one does?

I would greatly appreciate anybody who could clear this up for me. I have been unable to find a good explanation for these questions in my textbook. Thanks in advance!

Consider your pdf: $~f_{X,Y}(x,y)= 2\,\mathbf 1_{0\leq x\leq y\leq 1}$.   Where $\mathbf 1_A$ is an indicator, having value of $1$ when the condition $A$ is true, and $0$ otherwise.

Notice that the $f_{X,Y}$'s support of $\{(x,y): 0\leq x\leq y\leq 1\}$ is the triangle $\triangle(0,0)(0,1)(1,1)$.

Now to find the marginal for $X$ we must 'integrate out' the variable $Y$ for any given value for $X$.   Thus the bounds of this integral are $x\leq y\leq 1$.   Having 'integrated out' $y$ this leaves us with a support for $f_X$ of $\{x:0\leq x\leq 1\}$.   This is the projection of the triangle onto the x-axis.

$$f_X(x)~{=~\int_\Bbb R 2\;\mathbf 1_{0\leq x\leq y\leq 1 } \operatorname d y\\ =~2\;\mathbf 1_{0\leq x\leq 1}\int_x^1\operatorname d y\\=~2\,(1-x)\;\mathbf 1_{0\leq x\leq 1}}$$

Now we obtain the expected value for $X$ and $X^2$ by integrating over the support for its marginal pdf, via $$\mathbb E(X^n)~{=~\int_\Bbb R x^n\cdot f_X(x)\operatorname d x\\ =~ 2 \int_0^1 x^n(1-x)\operatorname d x \\ =~ 2(n+1)^{-1}(n+2)^{-1}}\quad\forall n\in\Bbb N$$

Thus $\mu_X=\tfrac 1 3~,~ \sigma_X^2=\tfrac 1{18}$

• Unfortunately, I have never encountered the approach that you are using in your explanation, so I am not sure this makes it any easier for me to understand. I appreciate your time & help regardless! – Hawleyluyah Jun 11 '17 at 2:58
• Actually, this is beginning to make a bit of sense to me. So after you integrate out y, the domain of f(x) is the same except that you ignore the y component? Furthermore, the domain of the marginal expected value and variance (of x) would be the same as the domain of f(x)? – Hawleyluyah Jun 11 '17 at 3:05
• @Hawleyluyah Indeed, after 'integrating out' $y$, then $y$ in no longer a component of the support. However, the mean and variance themselves do no have a support; they are constant values. – Graham Kemp Jun 11 '17 at 3:53