# Find distribution of test statistic under $H_0$

I have a shifted double exponential distribution with density $$f(x;\theta)=\frac{1}{2}e^{-|x-\theta|}$$ Now I have a test statistic given by $$T(x_1,...,x_n;\theta_0) = \sum_{i=0}^n |x_i - \theta_0| - \sum_{i=0}^n |x_i - \text{ median}(x_1,...,x_n)|$$ Which is exactly the likelihood ratio test statistic. The test is given by $$H_0 = \theta_0 \ \ \ \ \ \ H_1 \neq \theta_0$$

Now I have to show that the distribution of this $$T$$ under $$H_0$$ does not depend on $$\theta_0$$. I was going to say that $$Y_i = X_i - \theta_0$$ to show that $$Y_i \sim f(\cdot;\theta_0)$$ and to show that $$T(Y_1,...,Y_n;0) = T(X_1,...,X_n;\theta_0)$$. How can I do this? How can I find that distribution?

This is a location family of distributions. Under $$H_0,$$ $$X_i\sim f(x;\theta_0).$$ This implies $$Y_i=X_i-\theta_0\sim f(y;0),$$ i.e., $$Y_i$$ has pdf $$f(y;0)=\dfrac{1}{2}e^{-|y|}.$$ The distribution of $$Y_i$$ is hence free of $$\theta_0$$.
Median$$(Y_1,\dots,Y_n)=$$Median$$(X_1,\dots,X_n)-\theta_0.$$ As a result, $$X_i-\text{Median}(X_1,\dots,X_n)=Y_i+\theta_0-\text{Median}(Y_1,\dots,Y_n)-\theta_0.$$ So we can write $$T(X_1,\dots,X_n;\theta_0)=\displaystyle\sum_{i=1}^n|Y_i|-\sum_{i=1}^n|Y_i-\text{Median}(Y_1,\dots,Y_n)|=T(Y_1,\dots,Y_n;0).$$