# Probability that random variable B is greater than random variable A

I would like to find the answer to the following question. A casino offers games with one of the following 21 p’s [0; 0.05; 0.10 .... 0.90; 0.95; 1] and one of the following 21 v’s (values) [0; 5; 10 ... 90, 95, 100]. The person taking part in the game either wins the v or he gets nothing.

In sequence A, 98 games are offered. The total expected value (ev) of the 98 games is: 1785.75 euro. I assumed that the variance (var) could be computed by summing: ev * (v-ev). Thus, a game with a p of 0.5 and a v of 80 has an ev of 40 and a var of 1600. The total var is 31862.94.

In sequence B, 98 other games with different p’s and v’s are offered. The total ev is 1276 euro and the total var is 48585.75.

I assume that both binomial probability distributions can be approximated with a normal distribution with means of 1785.75 and 1276 and sd’s of 178.5019 and 220.4218 (square root of the variance).

I would like to know the probability based on the normal approximations that sequence B leads to more v than sequence A. The difference between the means is 509,75 euro which is between 2 and 3 sd’s. I am not looking for very exact answers. I would just like to know how the probability that V(B) > V (A) can be approximated.

-
Sequence A and B are indeed independent from each other. With regard to the normality assumption: The games that make up sequences A and B have been sampled in some way, but after the sampling I take the games as a given. The way I see it, both sequences are ‘Poisson binomial distributions’(see: en.wikipedia.org/wiki/Poisson_binomial_distribution) because the p’s are not all the same. I have assumed that these probability distributions can be can be approximated with a normal distribution. I hope this assumptions is correct. –  Franz Brentano Mar 15 '12 at 15:07

Estimating $\theta=P(A<B)$ where $A$ and $B$ are random variables is known as "stress-strength" models. In the normal case, $\theta$ is simply a function of the means and variances of $A$ and $B$:

$\theta=P(A<B) = \Phi\left(\dfrac{\mu_B-\mu_A}{\sqrt{\sigma_A^2+\sigma_B^2}}\right). (*)$

For a more detailed review check this book.

If you have samples from $A$ and $B$, then you can estimate $(\mu_A,\mu_B,\sigma_A,\sigma_B)$ using the sample mean and variances and then plug them into $(*)$. This will be the Maximimum Likelihood Estimator of $\theta$.

Best wishes.

-
Thanks a lot for your answer. If I understand you correctly, this leads to the following result. 509.75/ sqroot (31862.94 + 48585.75) = 1.79. This Z-score has a value of 0.9633. So the probability that sequence B leads to more v than sequence A is 1-0.9633 = 3,67%. –  Franz Brentano Mar 15 '12 at 13:35
@FranzBrentano Yes, you are correct. I would also check the normality assumption of the samples. For this purpose, you can use shapiro.test() in R or a graphical tool like qqnorm() and qqline(). –  user9410 Mar 15 '12 at 13:44
Probably it's understood, but to use that formula the 2 Normal r.v.'s must be independent. –  andrea Mar 15 '12 at 14:05