Proving that $T(X)$ is a sufficient statistic for $\theta$ I have that $X=(X_1,...,X_n)$ is a rv consisting of $n$ iid exponential rv's where $\theta$ is the parameter (and thus mean $1\over \theta$) .
I have to prove that $T(X)=\sum^n_{i=1}X_i$ is a sufficient statistic for $\theta$ using the theorem in my textbook which states that if $\frac{f_{\theta}(x)}{f^T_{\theta}(T(x))}$ is constant in $\theta$ then $T(X)$ is a sufficient statistic for ${\theta}$.
So what I've done is:
First I calculated $f_{\theta}(x)= \theta^n e^{-\theta\sum^n_{i=1}X_i}$ since $x=(x_1,...,x_n)$ are iid. 
Then I calculated $f_{\theta}^T(T(x))= \frac{{\sum^n_{i=1}X_i}^{n-1}e^{\frac{\sum^n_{i=1}}{\theta}}}{\theta^n(n-1)!}$ since $T(X)\sim gamma(n,\theta)$
So now using the theorem with the ratio I get stuck because the $\theta$'s don't cancel out:
$$\frac{f_{\theta}(x)}{f^T_{\theta}(T(x))}=\frac{\theta^n e^{-\theta\sum^n_{i=1}X_i}}{\frac{{\sum^n_{i=1}X_i}^{n-1}e^{\frac{\sum^n_{i=1}}{\theta}}}{\theta^n(n-1)!}}$$ $$=$$
$$\frac{\theta^{2n} (n-1)!e^{\frac{1-\theta^2}{\theta}\sum^n_{i=1}x_i}}{{\sum^n_{i=1}}^{n-1}}$$
So by my calculation(probably which are wrong), $\theta$ is not cancelling out. Any mistakes that I have made that you could possibly see? Any help would be appreciated!
Here's the theorem in my textbook:


 A: Your expression for the exponential distribution uses θ as a rate while your expression for the gamma distribution uses θ as a scale. They need to be consistent.  So 


*

*You found $f_{\theta}(x)= \theta^n e^{-\theta\sum\limits^n_{i=1}x_i}$ which is $\theta^n e^{-\theta T(x)}$ since $T(x) = \sum\limits^n_{i=1}x_i$

*You should have found $f_{\theta}^T(T(x))= \theta^n \frac{T(x)^{n-1}}{(n-1)!} e^{-\theta T(x)}$ 

*That makes $\dfrac{f_{\theta}(x)}{f^T_{\theta}(T(x))} = \dfrac{(n-1)!}{T(x)^{n-1}}$ which does not depend on $\theta$ or the individual $x_i$ except through $T(x)$
A: The condition "$\frac{f_{\theta}(x)}{f^T_{\theta}(T(x))}$ is constant in $\theta$" can be rephrased as:
Joint probability density function of $X_i$ can be written in the form:
$$f(X_i;\theta) = g(T(X_i);\theta) \,\, h(X_i)$$
Note that first term doesn't depend on individual $X_i$'s only on the statistic, while second term is not dependent on $\theta$ (think of it as $X$ interacting with $\theta$ only through $T$).
For iid exponentials it turns out that $h(X_i)$ is just a constant so it's even simpler. Namely:
$$ f(X_i;\theta) = \theta^n \exp(-\theta T(X_i)) \times 1$$
Which gives you explicit decomposition.
