Let $X_1,\ldots,X_n$ be a random sample from $U(\theta-\frac{1}{2},\theta+\frac{1}{2})$. Show that the statistics $T(X_1,\ldots,X_n)=(X_{(1)},X_{(n)})$ is a sufficient statistics for $\theta$.
Can someone show me how to use the theorem below in proving the above question:
Theorem If $p(x|\theta)$ is the joint pdf or pmf of $X$ and $q(t|\theta)$ is the pdf or pmf of $T(X)$, then $T(X)$ is a sufficient statistic for $\theta$ if, for every $x$ in the sample space, the ratio $$\frac{p(x|\theta)}{q(T(x)|\theta)}$$ is a constant as a function of $\theta$.