This morning I had a fun support request related to our software. The exchange took place over email but it could have fit into a couple Twitter messages. Would that all requests could be answered so succinctly.
Question:
Do you have R code to compute P(X > Y) where X ~ gamma(ax, bx) and Y ~ gamma(ay, by)?
Response:
ineq <- function(ax, bx, ay, by) pbeta(bx/(bx+by), ay, ax)
For more on the problem and the solution, see Exact calculation of inequality probabilities.
Related links:
This just blew my mind. Where on earth do you work?
I work at M. D. Anderson Cancer Center.
Mathematica 8’s native support for computing probabilities is amazing.
sorry for being late to the party, only found your blog recently, and i’ve been enjoying it much. if it’s succinctness you’re after, you could have just answered “yes”…
cheers,
p