# How I determine the probability that an unknown probability value is greater than others in a set?

I have a number of known beta distributions for different unknown probability values.

Given the beta distributions, I want to determine the probability that each specific unknown probability values is greater than all others.

How can I do this? (Please be gentle, I'm a software engineer ;)

-
To make sure that we're on the same page: are you saying that you have $X_1, \ldots, X_n$ random variables, where $X_i$ has distribution $Beta(\alpha_i, \beta_i)$, for $i = 1, \ldots, n$, and you want to know the probability that $X_i$ is the largest of $X_1, \ldots, X_n$? Or something else? – Michael Lugo Feb 8 '11 at 23:07
Michael, yes - that is correct. – sanity Feb 9 '11 at 12:22
Can we assume that the random variables are independent? – Shai Covo Feb 9 '11 at 13:58
Shai, yes, you can assume they are independent. – sanity Feb 9 '11 at 21:08

In view of the [algorithms] tag (and since you are a software engineer), perhaps you'll be satisfied with the following answer. Assume that $X_i$ are independent ${\rm Beta}(\alpha_i,\beta_i)$ variables. Then, you can evaluate the probability ${\rm P}(X_i = \max \lbrace X_1 , \ldots ,X_n \rbrace )$ using Monte Carlo simulations, as follows. Obviously, the problem amounts to simulating a ${\rm Beta}(\alpha,\beta)$ variable. This can be done simply as follows, according to Example 2.11 in the book Monte Carlo statistical methods (see references therein). If $U$ and $V$ are independent ${\rm uniform}[0,1]$ variables, then the distribution of $\frac{{U^{1/\alpha } }}{{U^{1/\alpha } + V^{1/\beta } }}$ conditional on $U^{1/\alpha } + V^{1/\beta } \le 1$ is the ${\rm Beta}(\alpha,\beta)$ distribution. As noted in that example, this result does not provide a good algorithm to generate ${\rm Beta}(\alpha,\beta)$ variables for large values of $\alpha$ and $\beta$ (because of the constraint on $U^{1/\alpha } + V^{1/\beta }$). But if your $\alpha_i$ and $\beta_i$ are not large, you might find this simple algorithm useful enough (depending on the accuracy you wish to achieve).
EDIT: This approach may be particularly useful for values $\alpha_i,\beta_i \in (0,1)$, for two reasons. First, this increases the probability that $U^{1/\alpha } + V^{1/\beta } \le 1$ (that is, the pair $(U,V)$ is not rejected). Second, the ${\rm Beta}(\alpha,\beta)$ density function is not bounded if $\alpha \in (0,1)$ or $\beta \in (0,1)$, and so a tractable analytical expression for ${\rm P}(X_i = \max \lbrace X_1 , \ldots ,X_n \rbrace )$ is not likely to be found in this case. Of course, everything changes if the parameters are integers...
Indeed, this wouldn't work in that situation. Are the parameters $\alpha_i$ and $\beta_i$ integers? How large $n$ typically is? – Shai Covo Feb 9 '11 at 21:19
In the context of my last comment, it is worth noting that a ${\rm Beta}(\alpha,\beta)$ random variable has mean $\frac{\alpha }{{\alpha + \beta }}$ and variance $\frac{{\alpha \beta }}{{(\alpha + \beta )^2 (\alpha + \beta + 1)}}$. – Shai Covo Feb 10 '11 at 1:36