# UMP Test for exponential random variable

Let $$X_i\sim \text{Exp}(\theta)$$ for $$i=1,\dots,n$$ i.i.d with density $$\begin{equation*} f(x,\theta) = \begin{cases} \theta \exp(-x\theta ),& x\geq 0\\ 0,& x< 0. \end{cases} \end{equation*}$$ I want to test the hypothesis $$\begin{equation*} H_0: \theta = \theta_0 \quad \text{vs} \quad H_1: \theta = \theta_1 \quad \text{with}\quad \theta_1 > \theta_0 \end{equation*}$$ The Neyman-Pearson lemma provides a UMP test at level $$\alpha$$ of the form $$$$\varphi^*(X) = \begin{cases} 1, & \hspace{0.25cm} f_1(X) > k f_0(X),\\ 0, & \hspace{0.25cm} f_1(X) < k f_0(X). \end{cases}$$$$

For some critical value $$k$$. The densities are absolutely continious, therefore we can look at the likelihood ratio. Since they are i.i.d this is just the product of the respective densities and we get $$\begin{equation*} \frac{f(X,\theta_1)}{f(X,\theta_0)}=\frac{\theta_1^{n}\exp(-\theta_1\sum_{i=1}^n x_i )}{\theta_0\exp(-\theta_0\sum_{i=1}^n x_i )} = \frac{\theta_1^n}{\theta_0^n}\exp\left(-(\theta_1-\theta_0)\sum_{i=1}^n x_i\right)>k. \end{equation*}$$ My problem arises, when I rearrange this term to get an equivalent condition. \begin{align*} \frac{\theta_1^n}{\theta_0^n}\exp\left(-(\theta_1-\theta_0)\sum_{i=1}^n x_i\right)&>k \\ n\log(\theta_1/\theta_0)-(\theta_1-\theta_0)\sum_{i=1}^n x_i&>k'\\ -(\theta_1-\theta_0)\sum_{i=1}^n x_i&>k'-n\log(\theta_1/\theta_0)\\ -\frac{(\theta_1-\theta_0)}{n}\sum_{i=1}^n x_i&>k'/n-\log(\theta_1/\theta_0)\\ \frac{1}{n}\sum_{i=1}^n x_i&<\frac{k'/n-\log(\theta_1/\theta_0)}{(\theta_1-\theta_0)}=:k''.\\ \end{align*} The inequality switches in the last step since we assume $$\theta_1>\theta_0$$. However this seems odd. Using some probability theory we calculate $$k''$$ for $$\alpha=0.05$$. Since the sum of i.i.d exponential r.v. is $$Gamma(n,\theta)$$ and $$Gamma(n,1/2) = \chi^2(2n)$$ this results in the condition $$\begin{equation*}\alpha = \mathcal{P}_{\theta_0}(\overline{X}_n Thus we get $$2\theta_0nk''= \chi^2_{1-\alpha}(2n)$$, where the subscript denotes the $$1-\alpha$$ quantile. Therefore, $$k''=\frac{\chi^2_{1-\alpha}(2n)}{2\theta_0n}.$$

The reason why the condition $$\overline{X}_n seems odd is the following simulation for a sample of 15 exponential r.v. with parameter $$\theta = 1$$, where i test $$\theta_0 = 1$$ vs $$\theta_1 = 2$$. The likehood ratio process goes very nicely to $$0$$, as one would expect with how i chose the values. However the condition for the sample mean would reject the null in favor of the paramter $$\theta_1$$, since the sample mean is lower than the critical value $$k''$$ (in the image discription it says k'). This cannot be right, therefore I assume an error when calculating $$k''.$$

and

• The sum of exponential r.v. with rate parameter $$\theta$$ is $$Gamma(n,\theta)$$, therefore $$1/n * Gamma(n,\theta) \sim Gamma(n,n\theta)$$ thus I needed not look at the mean as the statistic, the sum would have been sufficient.
• For calculating $$k''$$: the probabilty $$\mathcal{P}(X for a r.v. $$X$$ means $$k''$$ is precisely the $$\alpha$$ quantile, not the $$1-\alpha$$ quantile of the distribution of $$X$$. Therefore, $$k''= \frac{\chi^2_\alpha(2n)}{2\theta_0 n}$$ when the mean is the equivalent statistic. If the sum is used as an equivalent statistic $$k''= \frac{\chi^2_\alpha(2n)}{2\theta_0}.$$