# Comparing events in two probability distributions

1. Jul 26, 2013

### Corribus

Hi everyone,

Suppose I have two samples that can be described by an observable. Call it x. x can take on any value from 0 to infinity.

The distribution of values of x for sample 1 can be described by the normalized probability distribution f(x). The distribution of values of x for sample 2 can be described by the normalized probability distribution g(x).

If I make single independent measurements of x for both samples, how can I express the probability that the observed value of x from sample 1 exceeds the observed value of x from sample 2?

Nothing I've come up with gives me an answer that makes sense. My internal check is that if f(x) and g(x) are identical, then the probability should (I would think) approach 0.5.

2. Jul 26, 2013

### Staff: Mentor

You need a two-dimensional integral for that - integrate over both functions with the right borders and you get the right result.

3. Jul 26, 2013

### Corribus

Right, I figured that. But what are the bounds? A friend of mine helped me come up with one possibility, but it's not giving me answers that make sense when I put my actual functions in and perform the integration.

4. Jul 27, 2013

### Staff: Mentor

Let one integration variable be larger than the other.

5. Jul 27, 2013

### Corribus

With respect, this is not very helpful. I need a general solution.

6. Jul 28, 2013

### Staff: Mentor

And I gave you hints how to get the general solution.
It is not complicated and I think you can learn something if you try to find the integral limits on your own, but if you just want the solution: you can find it in textbooks and probably on several websites, too.

A sketch with the distributions in a 2D-plane might help.

7. Jul 28, 2013

### Corribus

Hi mfb,
I appreciate the attempt at Socratic instruction, but I did not post this in the homework section on purpose. I'm a professional PhD chemist trying to solve a problem in an expedient fashion. Vague hints are not what I'm after, nor am I looking for a remedial course in calculus. I mistook this for a place where science professionals could seek help from mathematics experts, but I see it is more geared toward students. So I will find other sources for answers to my question.
Best,

8. Jul 28, 2013

### Staff: Mentor

I just don't consider myself as a replacement for textbooks. This subforum you chose is for discussions about mathematics, but your question is clearly homework-like, even if it is not actual homework. In addition, you could look up the answer yourself.
It is as elementary as finding the probability that a variable is positive - where this variable is the difference between your two measurements.

$$\int_{-\infty}^\infty \int_y^\infty f(x) g(y) dx dy$$ gives the probability that y is larger than x.