Given the following joint density function:
\begin{equation} f (x,y) = \begin{cases} 2& \text{} 0 \le x \le 1-y, 0 \le y \le 1\\ 0 &\text{otherwise} \end{cases} \end{equation} Find $f_{y}(1/2)$.
Since this is a continuous distribution, is the answer $0$. Or do I have to integrate the marginal density of $y$ from $0$ to $1/2$ or from $1/2$ to $1$.
You may first calculate the marginal density or you calculate directly:
\begin{eqnarray*} f_Y\left(\frac{1}{2}\right) & = & \int_{-\infty}^{+\infty}f\left(x,\frac{1}{2}\right)\; dx \\ & = & \int_{0}^{1-\frac{1}{2}}2\; dx \\ & = & 2\cdot \frac{1}{2} = 1 \\ \end{eqnarray*}