Skip to main content

Advertisement

Log in

Graph-based algorithms for phase-type distributions

  • OriginalPaper
  • Published:
Statistics and Computing Aims and scope Submit manuscript

Abstract

Phase-type distributions model the time until absorption in continuous or discrete-time Markov chains on a finite state space. The multivariate phase-type distributions have diverse and important applications by modeling rewards accumulated at visited states. However, even moderately sized state spaces make the traditional matrix-based equations computationally infeasible. State spaces of phase-type distributions are often large but sparse, with only a few transitions from a state. This sparseness makes a graph-based representation of the phase-type distribution more natural and efficient than the traditional matrix-based representation. In this paper, we develop graph-based algorithms for analyzing phase-type distributions. In addition to algorithms for state space construction, reward transformation, and moments calculation, we give algorithms for the marginal distribution functions of multivariate phase-type distributions and for the state probability vector of the underlying Markov chains of both time-homogeneous and time-inhomogeneous phase-type distributions. The algorithms are available as a numerically stable and memory-efficient open source software package written in C named ptdalgorithms. This library exposes all methods in the programming languages C and R. We compare the running time of ptdalgorithms to the fastest tools using a traditional matrix-based formulation. This comparison includes the computation of the probability distribution, which is usually computed by exponentiation of the sub-intensity or sub-transition matrix. We also compare time spent calculating the moments of (multivariate) phase-type distributions usually defined by inversion of the same matrices. The numerical results of our graph-based and traditional matrix-based methods are identical, and our graph-based algorithms are often orders of magnitudes faster. Finally, we demonstrate with a classic problem from population genetics how ptdalgorithms serves as a much faster, simpler, and completely general modeling alternative.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  • Aalen, O.O.: Phase type distributions in survival analysis. Scand. J. Stat. 447–463 (1995)

  • Acal, C., Ruiz-Castro, J.E., Aguilera, A.M., Jiménez-Molinos, F., Roldán, J.B.: Phase-type distributions for studying variability in resistive memories. J. Comput. Appl. Math. 345, 23–32 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  • Albrecher, H., Bladt, M.: Inhomogeneous phase-type distributions and heavy tails. J. Appl. Probab. 56(4), 1044–1064 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  • Bladt, M., Nielsen, B.F.: Matrix-exponential Distributions in Applied Probability, vol. 81. Springer, New York (2017)

    MATH  Google Scholar 

  • Bobbio, A., Horváth, A., Telek, M.: The scale factor: a new degree of freedom in phase-type approximation. Perform. Eval. 56(1–4), 121–144 (2004)

    Article  Google Scholar 

  • Cumani, A.: On the canonical representation of homogeneous markov processes modelling failure-time distributions. Microelectron. Reliab. 22(3), 583–602 (1982)

    Article  MathSciNet  Google Scholar 

  • Duff, I.S., Erisman, A.M., Reid, J.K.: Direct Methods for Sparse Matrices. Oxford University Press, Oxford (2017)

    Book  MATH  Google Scholar 

  • Eisele, K.-T.: Recursions for compound phase distributions. Insur. Math. Econ. 38(1), 149–156 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  • Faddy, M., McClean, S.: Analysing data on lengths of stay of hospital patients using phase-type distributions. Appli. Stoch. Models Bus. Ind. 15(4), 311–317 (1999)

  • Frydenberg, M.: The chain graph Markov property. Scand. J. Stat. 333–353 (1990)

  • Goulet, V., Dutang, C., Maechler, M., Firth, D., Shapira, M., Stadelmann, M.: Expm: Matrix Exponential (2021). https://cran.r-project.org/package=expm

  • He, Q.-M.: Fundamentals of Matrix-Analytical Methods. Springer, New York (2014)

    Book  Google Scholar 

  • Hobolth, A., Bladt, M., Andersen, L.N.: Multivariate phase-type theory for the site frequency spectrum. J. Math. Biol. 83(6), 1–28 (2021)

    MathSciNet  MATH  Google Scholar 

  • Hobolth, A., Siri-Jegousse, A., Bladt, M.: Phase-type distributions in population genetics. Theor. Popul. Biol. 127, 16–32 (2019)

    Article  MATH  Google Scholar 

  • Kern, A.D., Hey, J.: Exact calculation of the joint allele frequency spectrum for isolation with migration models. Genetics 207(1), 241–253 (2017)

    Article  Google Scholar 

  • Kingman, J.F.C.: The coalescent. Stoch. Process. Appl. 13(3), 235–248 (1982). https://doi.org/10.1016/0304-4149(82)90011-4

    Article  MathSciNet  MATH  Google Scholar 

  • Navarro, A.C.: Order Statistics and Multivariate Discrete Phase-Type Distributions (2019)

  • Neuts, M.F.: Matrix-Geometric Solutions in Stochastic Models: An Algorithmic Approach. John Hopkins University Press, Baltimore (1981)

  • Rivas-González, I., Andersen, L.N., Hobolth, A.: Phasetyper: phase-type distributions in r with reward transformations and a view towards population genetics. BioRxiv (2022). https://doi.org/10.1101/2022.06.16.496381

    Article  Google Scholar 

  • Younes, H.L., Simmons, R.G.: Solving generalized semi-Markov decision processes using continuous phase-type distributions. AAAI 4, 742 (2004)

    Google Scholar 

Download references

Acknowledgements

We are grateful to two anonymous reviewers. Their useful comments and constructive suggestions helped improve a previous version of the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kasper Munch.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Røikjer, T., Hobolth, A. & Munch, K. Graph-based algorithms for phase-type distributions. Stat Comput 32, 103 (2022). https://doi.org/10.1007/s11222-022-10174-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11222-022-10174-3

Keywords

Navigation