Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume we have two random variables $X$ and $Y$ that are gamma distributed (or normally distributed, if it makes the math easier) with unknown parameters. We have samples $x_1,x_2,...,x_m$ and $y_1,y_2,...,y_n$ where $m$ and $n$ are small and may not be equal. What is the best way to determine if the mean of $X$ is greater than the mean of $Y$? I assume one possible way is to estimate the parameters of $Z=X-Y$ and compute $P(Z>0)$, but I don't want to throw away samples if $m \neq n$. Another way is to estimate the parameters of $X$ and $Y$ and compute $P(X>Y)$. What calculation is the most accurate, most meaningful, and best use of the data?


Actually, this isn't quite what I want. Assuming the means of $X$ and $Y$ are $\mu_x$ and $\mu_y$, I want to know $L(\mu_x>\mu_y)$ or $L(\mu_z>0)$, not $P(X>Y)$. (As I get more and more data, I know the means more exactly, so the likelihood should go to 0 or 1.) Also, is a prior needed?

share|cite|improve this question

is a prior needed?

Indeed, otherwise $\mu_x$ and $\mu_y$ are just numbers hence the probability that $\mu_x\gt\mu_y$ is not relevant, being $1$ if $\mu_x\gt\mu_y$ and $0$ otherwise.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.