Find a 1-dimensional sufficient statistic for theta. $X_1, X_2,\ldots,X_n$ is a sample from random variable $X$.
$$f(x\mid\theta)=\frac 1 {\sqrt{2\pi}}\exp{(-\frac{1}{2}(x-\theta)^2)}$$
I have to find a 1-dimensional sufficient statistic for $\theta$ and I'm not sure how to go about doing this. Any help would be appreciated.
I've got that the log-likelihood function is 
$$\ell(\theta)=\sum^n_{i=1}(-\frac{1}{2}(x-\theta)^2)$$
 A: Use the factorization theorem. 
Hint #$1$:
$$
\sum(x_i - \theta)^2 =\sum x_i^2-2\theta n\bar{x}_n+n\theta^2,
$$
Hint #$2$: 
The MLE is always a function of the MSS. What is the MLE of $\theta$?
A: $$
\prod_{i=1}^n f(x_i\mid\theta)= \prod_{i=1}^n \frac 1 {\sqrt{2\pi}}\exp\left(-\frac 1 2(x_i-\theta)^2\right) = \text{constant} \times \exp\left( - \frac 1 2 \sum_{i=1}^n (x_i-\theta)^2 \right).
$$
So we examine that sum:
\begin{align}
\sum_{i=1}^n (x_i-\theta)^2 & = \sum_{i=1}^n ((x_i-\overline x)+(\overline x - \theta))^2 \quad \text{where } \overline x = \frac 1 n \sum_{i=1}^n x_i \\[10pt]
& = \sum_{i=1}^n \Big((x_i-\overline x)^2 + 2(\overline x -\theta)(x_i-\overline x) + (\overline x - \theta)^2 \Big) \\[10pt]
& = \left( \sum_{i=1}^n ((x_i-\overline x)^2) \right) + \underbrace{2(\overline x - \theta) \sum_{i=1}^n (x_i - \overline x)}_{\text{The factor $2(\overline x \, - \, \theta)$ can be} \\ \text{pulled out because it does not} \\ \text{change as $i$ goes from $1$ to $n.$}} + n(\overline x - \theta)^2
\end{align}
But $\sum\limits_{i=1}^n (x_i-\overline x)=0,$ so this sum becomes
$$
n(\overline x - \theta)^2 + \sum_{i=1}^n (x_i-\overline x)^2.
$$
Now note that


*

*one of these terms does not depend on $\theta$, and

*the other one depends on $x_1,\ldots,x_n$ only through $\overline x.$


When you take the exponential, then instead of terms (i.e. things that are added), you have factors (i.e. things that are multiplied). Therefore Fisher's factorization theorem entails that $\overline X = (X_1+\cdots+X_n)/n$ is sufficient.
