The continuous random variables $X$ and $Y$ have the joint probability density function:
$$f(x, y)= \begin{cases} \dfrac{3}{2}y^2, & \text{ where } 0\leq x \leq 2 \text{ and } 0 \leq y \leq 1 \\[2ex] 0, & \text{ otherwise} \\ \end{cases} $$
I am asked to find the marginal distributions of $X$ and $Y$, and show that $X$ and $Y$ are independent.
I know the marginal distribution to be the probability distribution of a subset of values, does that mean the marginal distribution can be obtained by calculating the probability distribution of the piecewise function in locations where $f(x, y)$ does not equal zero?