Two sample test for exponential distribution with only two observations Suppose we have two independent random variables $X_1 \sim \exp(\lambda_1)$ and $X_2 \sim \exp(\lambda_2)$ .
Now, we are given just one observation each from the two distributions above, say $S_1$ and $S_2$ respectively. On the basis of these two observed numbers $S_1$ and $S_2$ , I am interested in testing the following two different hypotheses, viz.

*

*Null hypothesis $~~H_0 : ~~\lambda_1 = \lambda_2~~$ against the alternative hypothesis $~~H_A : ~~\lambda_1 \neq \lambda_2$

*Null hypothesis $~~H_0 : ~~\lambda_1 = \lambda_2~~$ against the alternative hypothesis $~~H_A : ~~\lambda_1 < \lambda_2$
Can someone please suggest appropriate ways to test these two hypotheses at some given level, say $\alpha\in(0,1)$ ?

Note : I guess, under the assumption of the null hypothesis (in both the problems), we may play with the random variable $Z = \frac{X_1}{X_1+X_2}$ because it'll probably be uniformly distributed. Anyway, I'm unable to think any further. Also, here $\exp(\lambda)$ refers to an exponential distribution with parameter $\lambda$ .
 A: Consider a likelihood ratio test.  Since the likelihood maximizing $\hat\lambda_0$, $\hat\lambda_1$, $\hat\lambda_2$, are respectively $1/\bar{x}=2/(x_1+x_2)$, $1/x_1$, and $1/x_2$, the likelihood ratio $\Lambda$ is
$$
\begin{align}
\Lambda &= \frac{f_{\hat\lambda_0}(x_1,x_2)}{f_{\hat \lambda_1}(x_1)f_{\hat \lambda_2}(x_2)} \\
&= \frac{\hat\lambda_0^2 e^{-\hat\lambda_0(x_1+x_2)}}{\hat\lambda_1 e^{-\hat\lambda_1x_1} \hat\lambda_2 e^{-\hat\lambda_2x_2}} \\
&= \frac{\hat\lambda_0^2}{\hat\lambda_1 \hat\lambda_2}e^{-\hat\lambda_0(x_1+x_2)+\hat\lambda_1x_1+\hat\lambda_2x_2} \\
&= \frac{x_1x_2}{\bar x^2}e^{-2+1+1} \\
&= \left(\frac{\tilde x}{\bar x}\right)^2
\end{align}
$$
where $\tilde x$ is the geometric mean of $x_1$ and $x_2$.
That gives the rule for the first hypothesis test to reject $H_0$ when $\tilde x/\bar x<c$ an appropriate $c$.  The same rule works for the second test but needs the accompanying condition that $x_1>x_2$.
The ratio of geometric to algebraic mean makes intuitive sense since the geometric is always less and only equals the algebraic mean with $x_1=x_2$.  If the two observations are close, then the null hypothesis looks reasonable and the likelihood ratio will be high.  If $x_1$ and $x_2$ are very different then the geometric mean will be a good deal less than the algebraic mean and the likelihood ratio will be low, indicating that the null hypothesis should be rejected.
