# Difference of hypoexponential distributions

Suppose that we have two random variables defined on the same sample space $\Omega$

$X\sim \text{Hypoexp}(\alpha_1,\dots,\alpha_n)$ and $Y\sim \text{Hypoexp}(\beta_1,\dots,\beta_m)$

or, equivalently, that $X$ is distributed like a sum of $n$ exponentials with parameters $\alpha_1,\dots,\alpha_n$ and $Y$ like a sum of $m$ exponentials with parameters $\beta_1,\dots,\beta_m$. An explicit expression for the density of $X$ and $Y$ is well known (see e.g. "On the Convolution of Exponential Distributions" by M. Akkouchi).

If we also assume that $n>m$ and that for every realization $\omega\in\Omega$, $X(\omega)>Y(\omega)$, how can I derive the distribution of $X-Y$? In other words, how can I compute something like

$\mathbb{P}(X-Y< t\mid X>Y)$

knowing again that $n>m$?

• This is very unclear: are $X$ and $Y$ independent and we are asking about $\mathbb{P}(X-Y<t|X>t)$, or are $X$ and $Y$ coupled in some way so that $X>Y$ a.s.? – Mateusz Kwaśnicki Oct 3 '17 at 15:47
• I didn't write that they are independent because in my problem they are not. Indeed, the last assumption I make is that $X>Y$ a.s., so they are dependent. – Muriel Oct 14 '17 at 10:10
• How they are coupled then, that is, what is the joint distribution of $(X,Y)$? – Mateusz Kwaśnicki Oct 14 '17 at 11:39
• Probably now I see your point. Are you saying that if they are not independent then their joint distribution should not be the one given in the solution? I should go back and look at the Akkouchi paper I mentioned, but you are probably right. – Muriel Oct 14 '17 at 12:08
• I do not quite understand what Henry.L meant in his answer, but certainly one needs to know the joint distribution of $(X,Y)$ in order to describe the distribution of $X - Y$. Note that it is not always possible to even define $(X,Y)$ with given marginals so that $X > Y$ a.s.; namely, one needs to know that $\mathbb{P}(X < t) < \mathbb{P}(Y < t)$ whenever both quantities are in $(0,1)$. – Mateusz Kwaśnicki Oct 14 '17 at 13:19

$$\mathbb{P}(X-Y<t\mid X>Y) =\frac{\mathbb{P}(X-Y<t,X>Y)}{\mathbb{P}(X>Y)} =\mathbb{P}(X-Y<t)$$ since $X(\omega)>Y(\omega),\ \forall\omega\in\Omega$.
$$\mathbb{P}(X-Y<t)=\int_{0}^{\infty}dy\int_{0}^{y+t}f_{(X,Y)}(x,y)dx$$ where $f_{(X,Y)}(x,y)=p_{1}f_{Exp(\alpha_{1})}\ast\cdots\ast p_{n}f_{Exp(\alpha_{n})}\ast q_{1}f_{Exp(\beta_{1})}\ast\cdots\ast q_{m}f_{Exp(\beta_{m})}$
(which follows (2.18) and (2.19) in Akkouchi's paper) with $\sum_{i}p_{i}=\sum_{j}q_{j}=1$.
and we know that $f_{Exp(\alpha)}(x)=\alpha e^{-\alpha x}$. The nontrivial part of this problem is to derive a closed form of the integral, which I doubt it is possible for arbitrary $n,m$ since such a hyper geometric function is not always simplifiable.
• This answer is as unclear as the question: in the first part, $X$ and $Y$ appear to be coupled (for $X>Y$ with probability one), while in the other part the are apparently assumed to be independent (although even in this case we have $f_{(X,Y)}(x,y)=(p_1 f_{\alpha_1}(x)+\ldots+p_n f_{\alpha_n}(x))(q_1 f_{\beta_1}(y)+\ldots+q_m f_{\beta_m}(y))$ rather than the expression given in the answer). – Mateusz Kwaśnicki Oct 3 '17 at 15:57
• As I have added before, $X$ and $Y$ are dependent. I am not sure I see where this solution is assuming independence. – Muriel Oct 14 '17 at 10:12