Find the maximum likelihood estimation of $\mu$ and the population mean given a $n$-sized sample of a population with distribution function:
$$\begin{aligned}f(x)=\frac1p, \quad 0 < x < p \end{aligned}$$
Estimate $p$ with the method of moments
I really don't know where to start from here. I understand $$\frac{1}{n}\sum_{i=1}^n X_i^k = E\left(x\right)$$
But I don't know what is the value of $E\left(x\right)$ of my distribution function. Thanks in advance.