Joint to marginal PDF, bounds of integration? (Bertsekas, Tsitsiklis, Question 3.4.15)

density functionintegrationmarginal-distributionprobability

I am working on Question 3.4.15 from the second edition of Introduction to probability by Bertsekas and Tsitsiklis:

"A point is chosen at random (according to a uniform PDF) within a
semicircle of the form $\{ (x, y) | x^2 + y^2 \leq r^2, y \geq 0 \}$,
for some given $r > 0$.

(a) Find the joint PDF of the coordinates $X$ and $Y$ of the chosen point.

(b) Find the marginal PDF of $Y$ and use it to find E[$Y$]".

For part (a), I found the following as the joint PDF:

$f_{X, Y}(x, y) = \begin{cases} \frac{2}{\pi r^2} & -r \leq x \leq r \text{ and
} 0 \leq y \leq r \\ 0 & \text{otherwise}\end{cases}$

For part (b), I'll need to integrate $f_{X, Y}$ over the whole domain of $X$. My question is how to set up this integral. One solution I looked at gave the integral in this way:

$f_Y = \int_{-\sqrt{r^2 – y^2}}^{+\sqrt{r^2 -y^2}} (f_{X, Y})dx$

Why shouldn't the bounds of integration be from $x = -r$ to $x = r$?

Best Answer

This is because the bounds of the region are not actually just "$-r\le x \le r$ and $0 \le y \le r$" (this would represent a rectangle rather than a semicircle). The bounds are actually with $y$ going from $0$ to $r$ and for each $y$ in this range, $x$ goes from $-\sqrt{r^2 - y^2}$ to $+\sqrt{r^2 -y^2}$. This description of the bounds gives us the desired "semicircular" (half-disk) region.

This means that when we integrate over all values of $x$ to calculate $f_{Y}(y)$ for some $y\in [0,r]$, the "all values of $x$" must be from $-\sqrt{r^2-y^2}$ to $+\sqrt{r^2 - y^2}$.

Related Question