Let's assume we picked chose two numbers in the range $[1,n]$ where $n\in \mathbb N$ independently, such that each one of them is distributed randomly.
How can I find the expectation of the minimum of these two numbers?
I know that we have $2n-1$ possibilities of getting $1$ as minimum, $2(n-1)-1$ possibilities of getting $2$ as minimum, and so on!
But how do I formalize this and calculate the expectation?
For $1 \le k \le n$, let $p_k$ be the probability that the minimum of the two numbers is $k$, and let $e$ be the expected minimum value. \begin{align*} \text{Then}\;\;p_k &= 2 \left( {\small{\frac{1}{n}}} \right) \left( {\small{\frac{n-k+1}{n}}} \right) - {\small{\frac{1}{n^2}}} \\[6pt] &=\frac{2n-2k+1}{n^2}\\[8pt] \text{Hence}\;\;e &=\sum_{k=1}^n kp_k\\[4pt] &=\sum_{k=1}^n k\left(\frac{2n-2k+1}{n^2}\right)\\[4pt] &=\frac{1}{n^2}\left(\sum_{k=1}^n k(2n-2k+1)\right)\\[4pt] &=\frac{1}{n^2}\left(\sum_{k=1}^n (2n+1)k-2k^2)\right)\\[4pt] &=\frac{1}{n^2}\left(\left(\sum_{k=1}^n (2n+1)k\right)-\left(\sum_{k=1}^n 2k^2)\right)\right)\\[4pt] &=\frac{1}{n^2}\left( \left((2n+1)\sum_{k=1}^n k\right) - \left(2\sum_{k=1}^n k^2)\right) \right)\\[4pt] &=\frac{1}{n^2} \left( (2n+1) \left({\small{\frac{n(n+1)}{2}}}\right) -2 \left({\small{\frac{n(n+1)(2n+1)}{6}}}\right) \right) \\[4pt] &=\frac{(n+1)(2n+1)}{6n}\\[4pt] \end{align*}