An urn contains N cards numbered from 1 to N. A random experiment It consists of selecting n cards at random and with replacement. Find the expected value of the largest number in the sample.
The answer is $N - \frac{1}{N^{n}} \Sigma_{k=1}^{N-1}k^{n}$ but I don´t how justify it.
Let $X$ enumerate the highest card selected in the sample; so $$\mathsf P(X>k)=\left(1-\left(1-\frac{k}{N}\right)^n\right)\mathbf 1_{k\in\{1..N\}}$$
Then the expected value is $$\begin{split}\mathsf E(X) &= \sum_{j=1}^{N} j~\mathsf P(X=j)\\ &= \sum_{j=1}^{N} \sum_{k=0}^{j-1} \mathsf P(X=j) \\ & = \sum_{k=0}^{N-1} \sum_{j=k+1}^{N}\mathsf P(X=j)\\ &= \sum_{k=0}^{N-1}\mathsf P(X>k) \end{split}$$
and so...