Sample mean sufficiency depends on the model (source code)

= Sample mean sufficiency depends on the model
{title2=$\overline X=n^{-1}\sum_iX_i$}

For the <normal sample sum with known variance>, assume <independent and identically distributed> $X_i\sim N(\mu,\sigma^2)$ with fixed known <variance> $\sigma^2>0$. The <joint probability density> factors as
$$
f_\mu(x)=\underbrace{(2\pi\sigma^2)^{-n/2}\exp\left[-\frac{\sum_i x_i^2}{2\sigma^2}\right]}_{h(x)}\underbrace{\exp\left[\frac{\mu\sum_i x_i}{\sigma^2}-\frac{n\mu^2}{2\sigma^2}\right]}_{g_\mu(\sum_i x_i)}.
$$
The <Fisher-Neyman factorization theorem> proves that the sum, and hence the <sample mean>, is a <sufficient statistic> for $\mu$. Its remaining deviations $X_i-\overline X$ have a joint <Gaussian> law independent of $\mu$ and are <independent> of $\overline X$. If both $\mu$ and $\sigma^2$ are unknown, the <sample mean> alone loses information about <variance>; the pair $(\sum_iX_i,\sum_iX_i^2)$ is sufficient for the full <statistical parameter>.

A discrete counterexample shows why a <sample mean> is not automatically sufficient for arbitrary <statistical models>. Let $X_1,X_2$ be <independent and identically distributed> on $\{0,1,2\}$ with
$$
P_\theta(X_i=0)=P_\theta(X_i=2)=\theta/2,\qquad P_\theta(X_i=1)=1-\theta,\qquad 0<\theta<1.
$$
Each observation has <mean> one. The arrangements $(0,2),(1,1),(2,0)$ all give <sample mean> one, yet
$$
P_\theta((X_1,X_2)=(1,1)\mid\overline X=1)=\frac{(1-\theta)^2}{(1-\theta)^2+\theta^2/2}.
$$
This conditional <probability> is $18/19$ at $\theta=1/4$ and $2/11$ at $\theta=3/4$. The <conditional distribution> therefore still depends on the unknown <statistical parameter>: this <sample mean> is not a <sufficient statistic>. The useful reduction depends on the family of full-data laws, even when its <mean> stays fixed.