What is $\Pr[T_a < T_b]$ for independent gamma RVs with same shape Given independent gamma random variables $T_a, T_b$ with shape $k$ and rates $\lambda_a, \lambda_b$, what is $\Pr[T_a < T_b]$? Estimates are welcome!
This question is motivated by the fact that, if $k$ is an integer then $T_a,T_b$ are the times of the first $k$ arrivals of Poisson processes with rates $\lambda_a, \lambda_b$ respectively. If it helps, you may assume $\lambda_a < \lambda_b$.
 A: Let $X$ and $Y$ be independent identically distributed random variables from $\Gamma(k,1)$, then $T_a \stackrel{d}{=} \lambda_a X$ and $T_b \stackrel{d}{=} \lambda_b Y$. Hence
$$
   \Pr(T_a < T_b) = \Pr\left(\frac{X}{Y} < \frac{\lambda_b}{\lambda_a}\right) = \Pr\left(\frac{\frac{X}{Y}}{\frac{X}{Y}+1} < \frac{\frac{\lambda_b}{\lambda_a}}{\frac{\lambda_b}{\lambda_a}+1}\right) = \Pr\left(\frac{X}{X+Y} < \frac{\lambda_b}{\lambda_a+\lambda_b}\right)
$$
where in the second equality we used the fact that $x \mapsto \frac{x}{x+1}$ is an increasing function. It is a well-known fact that $Z = X/(X+Y)$ equals in distribution to beta-distribution with parameters $k$ and $k$. Hence
$$
    \Pr(T_a < T_b) = F_Z\left(\frac{\lambda_b}{\lambda_a+\lambda_b}\right)  = \frac{\operatorname{B}(\frac{\lambda_b}{\lambda_a+\lambda_b}; k,k)}{\operatorname{B}(k,k)}
$$
where $\operatorname{B}(z; a,b)$ denotes incomplete beta function and $\operatorname{B}(a,b)$ denotes complete beta function.
Here is a confirmation in Mathematica:
In[1]:= With[{k = 4, la = 2, lb = 7}, 
 Probability[
   x < y, {x \[Distributed] GammaDistribution[k, la], 
    y \[Distributed] GammaDistribution[k, lb]}] == 
  CDF[BetaDistribution[k, k], lb/(la + lb)]]

Out[1]= True

