# Gamma Difference Distribution

#### ashish1789hota

##### New Member
What is the distribution of the difference of two gamma distributions with same scale parameter, and shape parameter of the first one is k(1+e), e -> 0 and second one is k.

What i exactly want to know is the following.
X~Gamma(K(1+e),\theta)
Y~Gamma(K,\theta)
Prob (X>Y) or P(X-Y)>0.

While trying to integrate i am stuck at the following intermediate step.

int (0,inf) (y)^(Ke-1) exp(-y/"\theta") Gamma(K,y/"\thata") dy.

#### BGM

##### TS Contributor
There should be no close form solution.

Suppose $$X \sim \Gamma(k(1 + \epsilon), \theta), Y \sim \Gamma(k, \theta)$$, $$X, Y$$ are independent.

$$\Pr\{Y < X\} = \int_0^{+\infty} \Pr\{Y < x\}\frac {1} {\theta^k\Gamma(k)} x^{k - 1} \exp\left\{-\frac {x} {\theta} \right\}dx$$

and the CDF $$\Pr\{Y < x\}$$ involves the incomplete gamma function.

In the special case that $$k$$ is a positive integer, the CDF of gamma can be expressed as the CDF of Poisson (a series form) which can be viewed as relationship between the waiting time and the count process.