2

It is an interview question: calculate the variance of difference between max and min $$variance[\max(\{X_i\}) - \min(\{X_i\})].$$

Here $\{X_i\}$ is n i.i.d uniform variables : U(0,1). I know it is easy to calculate the expectation using symmetry: $$E[\max - \min] = E[2*\max-1]=\dfrac{n-1}{n+1}.$$

I don't think that it makes sense if we calculate from the joint distribution since it is only a phone interview.

RobPratt
  • 50,938

2 Answers2

4

In this situation:

$$Y:=X_{(n)}-X_{(1)} \text{ has Beta-distribution with parameters }n-1\text{ and }2$$

$$\mathsf{Cov}\left(X_{(n)},X_{(1)}\right)=\frac1{(n+1)^2(n+2)}$$

$$\mathsf{Var}\left(X_{(n)}\right)=\mathsf{Var}\left(X_{(1)}\right)=\frac{n} {(n+1)^2(n+2)}$$

$$\mathsf{Var}\left(X_{(n)}-X_{(1)}\right)=\mathsf{Var}\left(X_{(n)}\right)+\mathsf{Var}\left(X_{(1)}\right)-2\mathsf{Cov}\left(X_{(n)},X_{(1)}\right)=\frac{2n-2}{(n+1)^2(n+2)}$$

I did not find out this myself but you can find all this here on Wikipedia.

Uptil now I don't see a way to escape from calculating the joint distribution.

drhab
  • 153,781
1

I don't see a simple way to find the exact variance. However, I can give an asymptotic estimate of the variance. First show $P(X_{min} \geq \frac{2\log n} n) = O(n^{-2})$ and similarly $P(X_{max} \leq 1-\frac{2\log n} n) = O(n^{-2})$. Then, w.p. $1-O(n^{-2})$, the event $\cal E$ that $$1-O\left(\frac{\log n}n\right)\leq X_{max}-X_{min} \leq 1$$ occurs. By conditioning on $\cal E$, we deduce that (think why) $$Var(X_{max}-X_{min}) = O\left(\frac{\log^2 n}{n^2}\right)$$

aoligei
  • 11