So given a joint pdf given by $f(y_1,y_2) = 6(1-y_2)$ with $0 \leq y_1 \leq y_2 \leq 1$ and trying to find $E(y_1)$
I used a double integral with the outer integral being from $(0,1)$ and the inner being from $(y_1,1)$. Why is it that the outer integral bounds become $(0,1)$ and not based on $y_2$ in a similar fashion to how the inner integral bounds are based on $y_1$? Is it because integrating over $y_2$ at first puts the outer integral "in terms of" only the $y_1$ dimension?
The joint pdf rewrites $$ f(y_1,y_2) = 6\left(1-y_2\right) \mathbf{1}_{0\leq y_1\leq y_2\leq 1} \, . $$ The domain where the pdf is nonzero is a triangle in the $y_1$-$y_2$ plane, with surface area $1/2$. The marginal pdf writes \begin{aligned} g(y_1) &= \int_{\Bbb R} 6\left(1-y_2\right) \mathbf{1}_{0\leq y_1\leq y_2\leq 1}\, \text{d}y_2 \\ &= 6\, \mathbf{1}_{0\leq y_1\leq 1} \int_{y_1}^1 \left(1-y_2\right)\, \text{d}y_2 \\ &= 3\, \left( 1- y_1\right)^2\, \mathbf{1}_{0\leq y_1\leq 1} \, . \end{aligned} The expected value is therefore $$ E(Y_1) = \int_{\Bbb R} y_1\, g(y_1)\,\text{d}y_1 = \frac{1}{4} \, . $$