[Math] Covariance of minimum and maximum of uniformly distributed random variables

probabilitystatistics

Let $(X_1,X_2,\ldots,X_n)$ be iid, such that each $X_i$ has the uniform distribution on the interval $(a,b)$. Calculate $Cov(\min(X_1,\ldots,X_n),\max(X_1,\ldots,X_n))$.

The task seems very hard to me. So far I calculated $E(\min(X_1,\ldots,X_n))=\frac{an+b}{n+1}$, $E(\max(X_1,\ldots,X_n))=\frac{bn+a}{n+1}$. I also found the joint density of $(\min(X_1,\ldots,X_n),\max(X_1,\ldots,X_n))$ – it is as follows:
$$f(x,y)=\left\{
\begin{array}{ll}
\frac{n!}{\left( n-2\right) !}\frac{\left(y-x\right)^{n-2}}{\left(b-a\right)^{n}} & \text{
if }a\leq x\leq y\leq b \\
0 & \text{in other cases.}%
\end{array}%
\right.
$$
So now the task is to calculate $E(\min(X_1,\ldots,X_n)\cdot\max(X_1,\ldots,X_n))$. How to do this effectively?

Best Answer

If you have to solve an integral like this $\int y(y-x)^{n}dy$ the more easy way is an integration by parts

$\int y(y-x)^{n}dy=\int y d\frac{(y-x)^{n+1}}{n+1}=y\frac{(y-x)^{n+1}}{n+1}-\int \frac{(y-x)^{n+1}}{n+1}dy=$

$=y\frac{(y-x)^{n+1}}{n+1}-\frac{(y-x)^{n+2}}{n+2}$

Related Question