1. Let X be a random variable with pdf

\[ f(x) = \begin{cases} 1, & \text{if } x \in [\theta - \frac{1}{2}, \theta + \frac{1}{2}] \\ 0, & \text{otherwise} \end{cases} \]
Derive the MLE of \( \theta \). (10 分)