Let $X$ be from a normal distribution $N(\theta,1)$.

a) Find a sufficient statistic for $\theta$.

b) Is $S_n^2$ a sufficient statistic for $\theta$?

**My answers**

For part a)

Since the joint p.d.f is $1 \over (2\pi)^{n/2}$$e^{{-1 \over 2}\sum(x_i-\theta)^2}$ I can say that $\sum X_i$ is a sufficient statistic for $\theta$ because $e^{{-1 \over 2}\sum(x_i-\theta)^2}$ depends on X only through the values of $\sum X_i$ right? Because if I know the value of $\sum X_i$ then I know $\sum X_i^2$ as well.

For part b)

Expanding the joint p.d.f as $$\frac{1}{(2\pi)^{n/2}}e^{{-1 \over 2}\sum(x_i-\theta)^2} = \frac{1}{(2\pi)^{n/2}}e^{{-1 \over 2}\sum(x_i- \bar x + \bar x-\theta)^2} = \frac{1}{(2\pi)^{n/2}}e^{{-1 \over 2}\Big[\sum(x_i- \bar x)^2+n(\bar x-\theta)^2\Big]} = \frac{1}{(2\pi)^{n/2}}e^{{-1 \over 2}\Big[{\sum(x_i- \bar x)^2 \over n-1}n-1+n(\bar x-\theta)^2\Big]}$$

Now can I say $S_n^2$ is a sufficient statistic for $\theta$ . Is it a problem that I have $\bar x$ in the function $g(S_n^2,\theta)$?.

Because $\bar x$ is a particular value I thought $g(S_n^2,\theta)$ depends on $\theta $ only through the values of $S_n^2$.