This post looks at computing P(X > Y) where X and Y are gamma random variables. These inequalities are central to the Thall-Wooten method of monitoring single-arm clinical trials with time-to-event outcomes. They also are central to adaptively randomized clinical trials with time-to-event outcomes.

When X and Y are gamma random variables P(X > Y) can be computed in terms of the incomplete beta function. Suppose X has shape α_{X} and scale β_{X} and Y has shape α_{Y} and scale β_{Y}. Then β_{X}Y/(β_{X} Y+ β_{Y}X) has a beta(α_{Y}, α_{X}) distribution. (This result is well-known in the special case of the scale parameters both equal to 1. I wrote up the more general result here but I don’t imagine I was the first to stumble on the generalization.) It follows that

P(X < Y) = P(B < β

_{X}/(β_{X}+ β_{Y}))

where B is a beta(α_{Y}, α_{X}) random variable.

For more details, see Numerical evaluation of gamma inequalities.

Previous posts on random inequalities:

Introduction

Analytical results

Numerical results

Cauchy distributions

Beta distributions

[...] Analytical results Numerical results Cauchy distributions Beta distributions Gamma distributions Three or more random variables Folded [...]