Problem:
Two birds have landed on a power line that spans the 100' distance between utility poles.
a) What is the average distance between the birds?
b) The line runs north and south. Another bird lands on the line. What is the expected position of the north-most bird from the south-most pole?
Partial Solution:
For the first part of the problem, I defined the first bird's position as the random variable $X$ and the second birds position as the random variable $Y$. Since both birds could lie in the range [0, 100], the plot of the birds' possible positions yielded a square with area $100^2$ feet$^2$. I then defined a new random variable, $Z$, to represent the distance between the two birds, defined by $|X-Y|$.Thus, the PDF of $Z$ can be written as $f_Z(z) = \begin{cases} 1/10000, & z\leq100, \\ 0, & \text{otherwise.} \end{cases} $ From here, to find the average distance between the birds, I solved for the expected value of $Z$, using the equation $\int_{-\infty}^\infty \int_{-\infty}^\infty z f_Z(z) \,dy\,dx$, which yielded that $E[Z] = E[|X-Y|] = 100/3$ feet.
So first and foremost, did I do this correctly?
Secondly, I am completely stuck on the second part of the problem.
The operating principle is that : $\mathbb{E}[g(X,Y)] = \iint_{\bf X\times Y} (g(x,y)\cdot f_{X,Y}(x,y))\operatorname{d}y\operatorname{d}x$
Since we have independent uniform distributions over $(0,100)$ then: $f_{X,Y}(x,y)= \frac{1}{100^2}$.
For the first part: $|x-y|=\begin{cases} x- y & : x\geq y\\y-x & : x<y\end{cases}$
So we need to integrate the function over two ranges: $y\in [0,x), y\in[x,100]$
$\begin{align} \mathbb{E}[|X-Y|] & =\frac{1}{100^2} \int_0^{100}\int_0^{100}|x-y|\operatorname{d}y\operatorname{d}x \\ & = \frac{1}{100^2} \int_0^{100} \int_{0}^x (x-y)\operatorname{d}y +\int_x^{100}(y-x)\operatorname{d}y\operatorname{d}x \\ & = \frac{1}{100^2}\int_0^{100} \left[xy-\frac 12 y^2\right]_{y=0}^{y=x} +\left[\frac 1 2 y^2-xy\right]_{y=x}^{y=100}\operatorname{d}x \\ & =\frac{1}{100^2} \int_{0}^{100} x^2 + \frac{100^2}{2}-100x\operatorname{d}x \\ & = \frac {1}{100^2}\left[\frac 1 3 x^3 + \frac{100^2 x}{2}- \frac{100 x^2}{2}\right]_{x=0}^{x=100} \\ & = \frac{1}{100^2}\left(\frac{100^3}{3}+\frac{100^3}{2}-\frac{100^3}{2}\right) \\ & = \frac{100}{3} \end{align}$
For the second part, you want $\mathbb{E}(\max(W,X,Y))$ where $W,X,Y$ are the mutually independent positions of the three birds; in feet north of the southern pole. Thus by the same principle:
$$\begin{align}\mathbb{E}(\max(W,X,Y)) & = \frac{1}{1000000}\int_0^{100}\int_0^{100}\int_0^{100} \max(w,x,y)\operatorname{d}y \operatorname{d}x \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \int_0^{100} \left(\int_0^{\max(w,x)} \max(w,x)\operatorname{d}y+\int_{\max(w,x)}^{100}y\operatorname{d}y\right) \operatorname{d}x \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \int_0^{100} \max(w,x)^2+\frac{100^2-\max(w,x)^2}{2} \operatorname{d}x \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \int_0^{100} \frac{100^2+\max(w,x)^2}{2} \operatorname{d}x \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \int_0^{100} \frac{100^2}{2}\operatorname{d}x + \int_0^w \frac{w^2}{2}\operatorname{d}x + \int_w^{100} \frac{x^2}{2} \operatorname{d}x \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \frac{100^3}{2} + \frac{w^3}{2} + \frac{100^3-w^3}{6} \operatorname{d}w \\ & = \frac{1}{1000000}\int_0^{100} \frac{2\times 100^3}{3} + \frac{w^3}{3} \operatorname{d}w \\ & = \frac{1}{100^3}\left(\frac{2\times 100^4}{3} + \frac{100^4}{12}\right) \\ & = 75 \end{align}$$