Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$$0<x<y<C,$$ $$f(x,y)\text{ given}$$

  1. If I want to find $E[X]$ do I have to integrate $x f(x)$ from $0$ to $C$ or from $0$ to $y$?
  2. If I want to find $E[E[Y\mid X]]$, I integrate $E[Y\mid X]\cdot f(x)$ from $0$ to $C$, but why not from $0$ to $y$ (since $x$ is constrained by $y$)?
share|cite|improve this question
up vote 1 down vote accepted

One way of finding $E(X)$ would be to find $f_X(x)$ and then finding $\displaystyle\int_0^C xf_X(x)\,dx$.

Another is just to find $\displaystyle\int xf_{X,Y}(x,y)\,dx$, integrating over the set $\{(x,y) : 0<x<y<C\}$.

To integrate over that latter set, you can take either of two approaches:

First approach: First, $y$ goes from $0$ to $C$, then for each value of $y$, $x$ goes from $0$ to $y$. Thus you have $$ \int_0^C\cdots\cdots\,dy $$ and inside that you have $$ \int_0^y \cdots\cdots\,dx. $$

Second approach: First $x$ goes from $0$ to $C$, then for each value of $x$, $y$ goes from $x$ to $C$. Thus you have $$ \int_0^C\cdots\cdots\,dx $$ and inside that you have $$ \int_x^C \cdots\cdots\,dy. $$

In your second question, what you need is $E(Y\mid X=x)\cdot f_X(x)$, from $0$ to $C$.

share|cite|improve this answer
thanks for your detailed asnwer. in my second question i know that it goes from 0 to C, but why not from 0 to y? because X is assumed to be fixed? – Wuschelbeutel Kartoffelhuhn Jan 23 '13 at 19:20
For the same reasons that those constraints only appear in the INSIDE integrals above. – Michael Hardy Jan 23 '13 at 19:22
also in your first sentence of your answer, why do you not integrate from 0 to y(since x depends on y)? – Wuschelbeutel Kartoffelhuhn Jan 23 '13 at 19:22
Have you carefully read my answer above? I think it might make those things clear. – Michael Hardy Jan 23 '13 at 20:16
@WuschelbeutelKartoffelhuhn : $X$ can be anywhere between $0$ and $C$, so its density is non-zero only between those bounds. Given a value of $X$, $Y$ can only be between $X$ and $C$, but that doesn't alter the fact that the set of possible values of $X$ is the set of numbers between $0$ and $C$. – Michael Hardy Jan 23 '13 at 22:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.