Background:
I am trying to understand how the commonly accepted sufficient statistic for a $U(a, b)$ distribution makes sense given the factorization theorem. I have specifically been experimenting with the discrete version. (I suspect the continuous case would be similar.)
Has this been asked before?
I searched for "discrete uniform sufficient statistic" both on this site and CrossValidated, but found very few results. I haven't found anything directly addressing this issue anywhere.
My work to this point:
Below I have copied from my notes. In what follows, let $X_1, \dots X_n$ be a random sample from $U(a, b)$, i.e. on $\{a, a + 1, \dots, b\}$.
Looking at the joint mass of a random sample, $f_{X_1, \dots, X_n}(x_1, \dots x_n) = \Big( \frac{1}{b - a + 1} \Big) ^n$, can we find a sufficent statistic for $\boldsymbol{\theta} = (a, b)$?
First, a bit of notation. Let $A = \{ a, a + 1, \dots, b \}$. Let $I_A(x_i)$ be the indicator function for the $i$th value in the sample. Then we can write the joint mass as follows:
\begin{align*} f_{X_1, \dots, X_n}(x_1, \dots x_n) &= \frac{1}{b - a + 1} I_A(x_1) \dots \frac{1}{b - a + 1} I_A(x_n)\\ &= \Big( \frac{1}{b - a + 1} \Big)^n I_A(x_1, \dots, x_n), \end{align*}
where the consolidated indicator function simply means that all the $x_i$'s have to be within the set $A$ in order for the joint mass to be as described (otherwise the joint mass is zero).
But notice that if the minimum of the values is at least $a$, and the maximum of the values is at most $b$, then all the others must be within $A$ as well. We will let $x_{(1)}$ refer to the smallest value, and $x_{(n)}$ refer to the largest. Therefore we can write
\begin{align*} f_{X_1, \dots, X_n}(x_1, \dots x_n) &= \Big( \frac{1}{b - a + 1} \Big)^n I_{x_{(1)} \geq a}(x_{(1)}) I_{x_{(n)} \leq b}(x_{(n)}). \end{align*}
Remembering the claim of the factorization theorem that if $f_{\boldsymbol{X}}(\boldsymbol{x} ; \boldsymbol{\theta}) = b \big( h(\boldsymbol{x}), \boldsymbol{\theta} \big) c(\boldsymbol{x})$, then $h(\boldsymbol{x})$ is sufficient for $\boldsymbol{\theta}$, we can let $b(h(\boldsymbol{x}), \boldsymbol{\theta}) = \Big( \frac{1}{b - a + 1} \Big)^n I_{x_{(1)} \geq a}(x_{(1)}) I_{x_{(n)} \leq b}(x_{(n)})$, and $c(\boldsymbol{x}) = 1$.
The issue that I have at this stage is that I think the sufficient statistic is supposed to be $h(\boldsymbol{x}) = (x_{(1)}, x_{(n)})$, but that precise expression doesn't appear in $b(h(\boldsymbol{x}), \boldsymbol{\theta})$. The expression that appears is $I_{x_{(1)} \geq a}(x_{(1)}) I_{x_{(n)} \leq b}(x_{(n)})$.
How do I reconcile this? I thought the exact expression for the sufficient statistic has to appear in the $b \big( h(\boldsymbol{x}), \boldsymbol{\theta} \big)$ term. As an example, when considering a random sample from $N(\mu, \sigma^2)$, where $\sigma^2$ is known, the factorization process makes it clear that $r(x_1, \dots, x_n) = \sum_{i = 1}^n X_i$ is sufficient for $\mu$, because the expression $\sum_{i = 1}^n x_i$ actually appears in the factorization.
Thanks for your help.