confused about selection of limits of joint distribution. I am given a joint distribution of two random variables, X and Y, which is as follows:
$$             f(x,y)= 8xy \\  0≤y≤x≤1     $$
Now I need to find :
$$  P[X\leq 1/2]       $$
Now I now I need to find marginal pdf first but I am confused between the limits. Will the limits be from $0$ to $1/2$, since we need to substitute the limits of y, if not, then what is the trick behind the selection of limits if we are given of this type?
 A: That the region common to the support $\{(x,y):0\le y\le x\le 1\}$ of the joint distribution and the restriction $x<1/2$ is $\{(x,y):0\le y\le x\le 1/2\}$ should be clear if you draw a picture.
Then it follows that
\begin{align}
P\left(X\le \frac{1}{2}\right)&=E\,[\mathbf1_{X\le1/2}]
\\&=\iint \mathbf1_{x\le1/2}\,f(x,y)\,\mathrm{d}x\,\mathrm{d}y
\\&=\iint \mathbf1_{x\le 1/2}\,8xy\,\mathbf1_{0\le y\le x\le 1}\,\mathrm{d}x\,\mathrm{d}y
\\&=8\iint xy\,\mathbf1_{0\le y\le x\le 1/2}\,\mathrm{d}x\,\mathrm{d}y
\end{align}
You are supposed to write the double integral as an iterated integral using Fubini's theorem, and depending on the order of integration, you have
$$\iint xy\,\mathbf1_{0\le y\le x\le 1/2}\,\mathrm{d}x\,\mathrm{d}y=\int_0^{1/2} y\left(\int_y^{1/2} x\,\mathrm{d}x\right)\mathrm{d}y=\int_0^{1/2} x\left(\int_0^x y\,\mathrm{d}y\right)\mathrm{d}x$$
Since the ranges of $x$ and $y$ are dependent, the inner integral is a function of the variable with respect to which you are evaluating the outer integral, while the outer integral runs free of the other variable, giving you a real value as the final answer.
