How to compare the mean of two samples whose data fits exponential distributions I have two samples of data, a baseline sample, and a treatment sample.
The hypothesis is that the treatment sample has a higher mean than the baseline sample.
Both samples are exponential in shape.  Since the data is rather large, I only have the mean and the number of elements for each sample at the time I will be running the test.
How can I test that hypothesis?  I'm guessing that it is super easy, and I've come across several references to using the F-Test, but I'm not sure how the parameters map.
 A: As an addendum to @Glen_b's answer, the likelihood ratio is
$$n_x\log \frac{n_x}{\sum x_i} +n_y \log \frac{n_y}{\sum y_j} -(n_x+n_y)\log\frac{n_x+n_y}{\sum x_i +\sum y_j}$$
which you can reärrange to
$$n_x\log\left(\frac{n_x}{n_y} + \frac{1}{r}\right) + n_y\log\left(\frac{n_y}{n_x}+r\right) + n_x\log\frac{n_y}{n_x+n_y} + n_y\log \frac{n_x}{n_x+n_y}$$
where $r=\frac{\bar{x}}{\bar{y}}$. There's a single minimum at $r=1$, so the F-test is indeed the likelihood ratio test against one-sided alternatives to the null hypothesis of identical distributions.
To perform the likelihood-ratio test proper for a two-sided alternative you can still use the F-distribution; you simply need to find the other value of the ratio of sample means $r_\mathrm{ELR}$ for which the likelihood ratio is equal to that of the observed ratio $r_\mathrm{obs}$, & then $\Pr(R>r_\mathrm{ELR})$. For this example $r_\mathrm{ELR}=1.3272$, & $\Pr(R>r_\mathrm{ELR})=0.2142$, giving an overall p-value of $0.4352$, (rather close to that obtained by the chi-square approximation to the distribution of twice the log likelihood ratio, $0.4315$).

But doubling the one-tailed p-value is perhaps the most common way to obtain a two-tailed p-value: it's equivalent to finding the value of the ratio of sample means $r_\mathrm{ETP}$ for which the tail probability $\Pr(R>r_\mathrm{ETP})$ is equal to $\Pr(R<r_\mathrm{obs})$, & then finding $\Pr(R>r_\mathrm{ETP})$. Explained like that, it might seem to be putting the cart before the horse in letting tail probabilities define the extremeness of a test statistic, but it can be justified as being in effect two one-tailed tests (each the LRT) with a multiple comparisons correction—& people are usually interested in claiming either that $\mu_x > \mu_y$ or that $\mu_x < \mu_y$ rather than that either $\mu_x > \mu_y$ or $\mu_x < \mu_y$. It's also less fuss, & even for fairly small sample sizes, gives much the same answer as the two-tailed LRT proper.

R code follows:
x <- c(12.173, 3.148, 33.873, 0.160, 3.054, 11.579, 13.491, 7.048, 48.836,
       16.478, 3.323, 3.520, 7.113, 5.358)

y <- c(7.635, 1.508, 29.987, 13.636, 8.709, 13.132, 12.141, 5.280, 23.447, 
       18.687, 13.055, 47.747, 0.334,7.745, 26.287, 34.390, 9.596)

# observed ratio of sample means
r.obs <- mean(x)/mean(y)

# sample sizes
n.x <- length(x)
n.y <- length(y)

# define log likelihood ratio function
calc.llr <- function(r,n.x,n.y){
  n.x * log(n.x/n.y + 1/r) + n.y*log(n.y/n.x + r) + n.x*log(n.y/(n.x+n.y)) + n.y*log(n.x/(n.x+n.y))
}

# observed log likelihood ratio
calc.llr(r.obs,n.x, n.y) -> llr.obs

# p-value in lower tail
pf(r.obs,2*n.x,2*n.y) -> p.lo

# find the other ratio of sample means giving an LLR equal to that observed
uniroot(function(x) calc.llr(x,n.x,n.y)-llr.obs, lower=1.2, upper=1.4, tol=1e-6)$root -> r.hi

#p.value in upper tail
p.hi <- 1-pf(r.hi,2*n.x,2*n.y)

# overall p.value
p.value <- p.lo + p.hi

#approximate p.value
1-pchisq(2*llr.obs, 1)

