Let $ X_1, ... X_n $ a sample of independent random variables with uniform distribution $(0,\theta) $
We know that a $\widehat\theta $ estimator for theta using the maximun estimator method is $\widehat\theta=\max_{i=1,...,n}X_i$ and the expectation $ \mathop{\mathbb{E}[X_i]}=\frac{\theta }{2}$.
In my classe, the teacher used the definition to calculate the distribution function of $\widehat\theta $ and then the expectation $ \mathop{\mathbb{E}[\widehat\theta]}=\frac{n.\theta }{n+1}$.
Why can't we conclure that $ \mathop{\mathbb{E}[\widehat\theta]}=\frac{\theta }{2}$, since $ \mathop{\mathbb{E}[X_i]}=\frac{\theta }{2}, \forall i$ and $\widehat\theta=\max_{i=1,...,n}X_i$?
Because $P(\widehat\theta>X_i)>0$ (if $n>1$) and $P(\widehat\theta<X_i)=0$.
It is not correct to think that $\mathbb E\max(X_1,\dots,X_n)=\max(\mathbb EX_1,\dots,\mathbb EX_n)$.