Sufficient Statistic for $f(x,\theta)=\dfrac{2}{\theta^{2}} (\theta-x) \cdot 1_{(0,\theta)}(x), \;\forall \theta \in (0,\theta) $ Let $X_{1},\ldots, X_{n}$ be random variables independent and identically distributed; show that the following density function is in the exponential family and find the sufficient statistic for $\theta$.
$$ f(x, \theta)=f(x,\theta)=\dfrac{2}{\theta^{2}} (\theta-x) \cdot 1_{(0,\theta)}(x), \;\forall x \in (0,\theta) $$
My attempt is
$f(x, \theta)=e^{\ln(\theta-x)+\ln(2/\theta^{2})}\cdot 1_{(0,\theta)}(x)$.
My question is: can I consider $T(x_{1},\ldots,x_{n})=\sum_{i=1}^{n}\ln(\theta-x_{1})$ a sufficient statistic for $\theta?$ If the sufficient statistic cannot depend on the parameter, does this density function not have a sufficient statistic?
How to reduce this expression so that the statistic found does not depend on $\theta$?

Firstly, your sufficient statistic must be a statistic ---i.e., it is a function of the data but it cannot depend on $\theta$.  You figure out the sufficient statistic by first writing out the likelihood function for a full data vector and stripping it down to the parts that depend on the parameter:
$$\begin{align}
L_\mathbf{x}(\theta) 
&= \prod_{i=1}^n f(x_i | \theta) \\[6pt]
&= \prod_{i=1}^n \frac{2}{\theta^2} (\theta - x_i) \mathbb{I}(0 \leqslant x_i \leqslant \theta) \\[6pt]
&= 2^n \theta^{-2n} \Bigg( \prod_{i=1}^n (\theta - x_i) \Bigg) \cdot \mathbb{I}(x_{(1)} \geqslant 0) \cdot \mathbb{I}(x_{(n)} \leqslant \theta) \\[6pt]
&= 2^n \theta^{-2n} \Bigg( \prod_{i=1}^n (\theta - x_{(i)}) \Bigg) \cdot \mathbb{I}(x_{(1)} \geqslant 0) \cdot \mathbb{I}(x_{(n)} \leqslant \theta) \\[6pt]
&\overset{\theta}{\propto} \theta^{-2n} \exp \Bigg( \sum_{i=1}^n \ln (\theta - x_{(i)}) \Bigg) \cdot \mathbb{I}(x_{(n)} \leqslant \theta). \\[6pt]
\end{align}$$
The Fisher-Neyman factorisation theorem says that a statistic $\mathbf{T}(\mathbf{x})$ (which might be a scalar or a vector) is sufficient if there is a function $g$ such that:
$$L_\mathbf{x}(\theta) \overset{\theta}{\propto} g(\mathbf{T}(\mathbf{x}), \theta).$$
For IID data from any distribution, the ordered sample $\mathbf{x}_\text{ord} = (x_{(1)},...,x_{(n)})$ is always a sufficient statistic.  We can see that these values are sufficient to decompose the likelihood function as required above, so this is just like any other IID case where the ordered sample is sufficient.
Of course, in the present case we would want to go further and find the minimal sufficient statistic, so the question then becomes: is there any reduced statistic (involving a loss of information compared to the ordered sample) that is still sufficient?  What do you think?  Can you find one and show it is sufficient?  If not, can you prove that any sufficient statistic must be a function of the ordered sample?
