I have a sample of size $N$ values. I know the values are exponentially distributed, i.e. they are distributed according to this probability density function:
$$ f(x;\lambda) = \begin{cases} \lambda e^{-\lambda x} & x \ge 0, \\ 0 & x < 0. \end{cases} $$
Is there a best guess for the parameter $\lambda$, given I know the the largest value in my sample and the size?
The likelihood function for $\lambda$ is
$$L(\lambda) = \prod_{i=1}^n \lambda \exp(-\lambda x_i) = \lambda^n \exp \left(-\lambda \sum_{i=1}^n x_i\right)=\lambda^n\exp\left(-\lambda n \overline{x}\right),$$
where
$$\overline{x}={1 \over n}\sum_{i=1}^n x_i$$
is the sample mean.
The derivative of the likelihood function's logarithm is:
$$\frac{\mathrm{d}}{\mathrm{d}\lambda} \ln (L(\lambda)) = \frac{\mathrm{d}}{\mathrm{d}\lambda} \left( n \ln(\lambda) - \lambda n\overline{x} \right) = \frac{n}{\lambda}-n\overline{x}\ \begin{cases} > 0, \:\:\: 0 < \lambda < \frac{1}{\overline{x}}, \\[8pt] = 0, \:\:\: \lambda = \frac{1}{\overline{x}}, \\[8pt] < 0, \:\:\: \lambda > \frac{1}{\overline{x}}. \end{cases} $$
Consequently the maximum likelihood estimate for the rate parameter is:
$$\widehat{\lambda} = \frac{1}{\overline{x}}$$