Phase-type distribution - moments I was doing my best to calculate moments of phase-type distribution.
Density of phase-type distribution is
$$f(x)=\alpha e^{Sx}S_{0}$$
($\alpha$ is $1\times m$ vector; $S_{0}$ is $m\times 1$ vector; $S$ is $m\times m$ matrix) for all $x&gt;0$, where $e^{Sx}$ is matrix expotential.
So first of all I checked if integral of density over $\mathbb{R}$ is equal to $1$:
$$\int_{0}^{\infty}\alpha e^{Sx}S_{0} \ dx = [\alpha S^{-1}e^{Sx}S_{0}]_{x=0}^{\infty} = -\alpha S^{-1}S_{0}$$
So, the following equality must hold: $-\alpha S^{-1}S_{0}=1$
Now I tried to compute expected value:
$$\int_{0}^{\infty}x\alpha e^{Sx}S_{0} \ dx = [x\alpha S^{-1}e^{Sx}S_{0}]_{x=0}^{\infty} - \int_{0}^{\infty}\alpha S^{-1}e^{Sx}S_{0} \ dx = [-\alpha S^{-2}e^{Sx}S_{0}]_{x=0}^{\infty} = \alpha S^{-2}S_{0}$$
But according to wikipedia it should be equal to:
$$-\alpha S^{-1}\textbf{1}$$

Can anyone tell me where is the mistake?
Note that $S^{-1}S_0 = -1$, your answer is actually the same as that given by Wiki.
Note that $S^{-1}S_0 = -1$, your answer is actually the same as that given by Wiki.