# Problem with convergence random variables including maximum.

Good evening !

Let's say that $$X_1,X_2,...,X_n$$~$$U[0,X]$$

I want to prove or disprove that $$P(|max(X_1,X_2,...,X_n)-X| \ge \varepsilon) \rightarrow 0$$.

My intuition tell's me at start that this is true becouse when the $$n$$ will be bigger then maximum will be closer to X.

My first idea was to do this by inequality :

$$P(|max(X_1,X_2,...,X_n)-X|\ge \varepsilon) \le \frac{E(|max(X_1,X_2,...,X_n)-X|)}{\varepsilon}$$ and then to prove that $$E(|max(X_1,X_2,...,X_n)-X|) \rightarrow 0$$ .

So $$|max(X_1,X_2,...,X_n)-X|=X-max(X_1,X_2,...,X_n)$$

$$E(X-max(X_1,X_2,...,X_n))=X-E(max(X_1,X_2,...,X_n))$$

Let's calculate $$E(max(X_1,X_2,...,X_n)), Y_n :=(max(X_1,X_2,...,X_n)$$

$$P(Y_n \le t)=P(max(X_1,X_2,...,X_n) \le t)=P(X_1 \le t, X_2\le t,...,X_n \le t)=P(X_1\le t)P(X_2\le t)...P(X_n \le t)=\frac{t^n}{X^n}$$

So now compute cumulative distribution function :

$$F_{Y_n}(t)= \begin{cases} 0, &for \;t\;\in\;(-\infty,0)\\ \frac{t^n}{X^n}&for\;t\in\;[0,X]\\ 1&for\;t\;\in\;(X,+\infty) \end{cases}$$

The density function :

$$D_{Y_n}(t)=\begin{cases} 0, &for \;t\;\in\;(-\infty,0) \cup (X,+\infty) \\ \frac{nt^{n-1}}{X^n}&for\;t\in\;[0,X]\\ \end{cases}$$

$$E(Y_n)=\int_{0}^{X}t\cdot \frac{nt^{n-1}}{X^n}dt=X \cdot \frac{n}{n+1}$$

And it goes to $$X$$ when $$n \rightarrow \infty$$. So $$\frac{E(max(X_1,X_2,...,X_n)-X)}{\varepsilon} \rightarrow 0 \Rightarrow P(|max(X_1,X_2,...,X_n)-X| \ge \varepsilon) \rightarrow 0$$.

Am i thinking correctly ?

There is a much simpler way to do that:$${\Pr\Big\{|\max(X_1,X_2,...,X_n)-X| \ge \varepsilon\Big\}\\=\Pr\Big\{\max(X_1,X_2,...,X_n)-X \ge \varepsilon\Big\}\\+\Pr\Big\{\max(X_1,X_2,...,X_n)-X \le -\varepsilon\Big\}}$$also$$\Pr\Big\{\max(X_1,X_2,...,X_n)-X \ge \varepsilon\Big\}=0$$and$$\Pr\Big\{\max(X_1,X_2,...,X_n)-X \le -\varepsilon\Big\}=\left(1-{\varepsilon\over X}\right)^n$$therefore$$\Pr\Big\{|\max(X_1,X_2,...,X_n)-X| \ge \varepsilon\Big\}=\left(1-{\varepsilon\over X}\right)^n\to 0$$