Expected value - product of functions of uniformly distributed variables We have $n$ random variables $X_1,...,X_n$, $n\geq 2$, where $X_i∼U(0,1)$ and all of them are iid.
Let $ Z=\min(X_1,...,X_n)$ 
and $ \overline{X}  = \frac{1}{n}\sum_{i=1}^{n}{X_i}$.
Calculate $\text{Cov}(\overline{X},Z).$
I start with 
$\text{Cov}(\overline{X},Z) = E(\overline{X}Z) - E(\overline{X})E(Z) $
What I calculated is of course
$ E(\overline{X}) =  \frac{1}{2}  $
and
$ P(Z<t)=1-P(\min(X_1,...X_n)>t)=...=1-(1-t)^n $
$f_z(t) = n(1-t)^{n-1} $
$EZ=\int_0^1 zn(1-z)^{n-1} dz = ... =\frac {1}{n+1} $
Now when I get to product of $E(\overline{X},Z)$ starting with:
$E(\overline{X},Z) =E(\frac{1}{n}  \times (x_1+...+x_n) \times \min(x_1,...,x_n))=
E(x_n \times \min(x_1,...,x_n)) $ here I'm getting confused (how to write the integral(s))... Could someone please help with with that /give some hint ?
regards
 A: Mick A 
Thank you very much for your answer! I've calculated $E(Z^2)=\frac{2}{(n+1)(n+2)} $ which after appying to equation provided by you lead to $ E(X_iZ)=\frac{n^2+3n}{2n(n+1)(n+2)} $ and to final solution $Cov(\overline{X},Z)=\frac{1}{2(n+1)(n+2)}  $ which is correct.
Can you just confirm me if I undertand correctly that
\begin{eqnarray*}
E(X_iZ\mid X_i\gt Z) &=& E\left(Z(Z+1)/2\right) \\
\text{comes from the fact that} \\
E(X_iZ\mid X_i\gt Z)=E(E(X_iZ\mid X_i\gt Z, Z)) \\
= E(ZE(X_i\mid X_i\gt Z, Z)) \\
= E(Z \dfrac{E(X_i\wedge X_i\gt Z \mid Z)}{Pr(X_i\gt Z \mid Z)})) \\
= E(Z \dfrac{1-Z^2}{2(1-Z)}) \\= E(Z(1+Z)/2)\\
\text{and } \\ P(X_i\gt Z)=1-P(X_i\leq Z) = 1-P(X_i= Z) = 1- \frac{1}{n}=\frac{n-1}{n}\\
\end{eqnarray*}
A: I think the work you've done is all OK. For $E(\overline{X}Z)$, as a hint you could use, for any $i$,
\begin{eqnarray*}
E(X_iZ) &=& E(X_iZ\mid X_i=Z)P(X_i=Z) + E(X_iZ\mid X_i\gt Z)P(X_i\gt Z) \\
&=& \dfrac{1}{n}E(Z^2) + \dfrac{n-1}{n}E\left(Z(Z+1)/2\right) \\
&& \qquad\text{since, given $X_i\gt Z$, $X_i$ is uniformly distributed in interval $(Z,1)$} \\
&=& \dfrac{n+1}{2n}E(Z^2) + \dfrac{n-1}{2n}E(Z). \\
\end{eqnarray*}
$E(Z^2)$ can be found by integration similarly to $E(Z)$.
