# \[ANN\]: PhaseTypeDistributions.jl, PhaseTypeDistributionsFitting.jl (and FixedSparsityMatrices.jl)

**URL:** https://discourse.julialang.org/t/ann-phasetypedistributions-jl-phasetypedistributionsfitting-jl-and-fixedsparsitymatrices-jl/137631
**Category:** Package Announcements
**Tags:** statistics, linearalgebra, matrices, probability
**Created:** [June 15, 2026, 4:58am UTC](https://discourse.julialang.org/t/ann-phasetypedistributions-jl-phasetypedistributionsfitting-jl-and-fixedsparsitymatrices-jl/137631 "2026-06-15T04:58:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yoninazarathy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoninazarathy/32/10086_2.png) [@yoninazarathy](https://discourse.julialang.org/u/yoninazarathy)
#### Post date: [June 15, 2026, 4:58am UTC](https://discourse.julialang.org/t/ann-phasetypedistributions-jl-phasetypedistributionsfitting-jl-and-fixedsparsitymatrices-jl/137631/1 "2026-06-15T04:58:19Z")

</div>

We’re happy to announce two new packages for phase-type (PH) distributions, plus a supporting third package for structured matrices (which may be useful in its own right).

A phase-type distribution is the distribution of the time until absorption of a finite-state continuous-time Markov chain. This semi-parametric family can approximate any non-negative distribution arbitrarily well, and it appears throughout queueing theory, reliability, and survival analysis. See [Wikipedia: Phase-type distribution](https://en.wikipedia.org/wiki/Phase-type_distribution).

The packages:

- **[PhaseTypeDistributions.jl](https://github.com/Julia-Matrix-Analytic-Probability/PhaseTypeDistributions.jl)** — PH distributions (and their competing-risks generalization,  
MAPH) as first-class `Distributions.jl` types: `pdf`, `cdf`, `rand`, moments, and more.
- **[PhaseTypeDistributionsFitting.jl](https://github.com/Julia-Matrix-Analytic-Probability/PhaseTypeDistributionsFitting.jl)** — maximum-likelihood fitting of PH and MAPH  
distributions from data, via the EM algorithm.
- **[FixedSparsityMatrices.jl](https://github.com/yoninazarathy/FixedSparsityMatrices.jl)** – a supporting utility: dense arrays with a _fixed sparsity pattern_, so structural zeros are preserved exactly through linear-algebra operations.

Prior (not currently maintained) Julia work in this space is [EMpht.jl](https://github.com/Pat-Laub/EMpht.jl), which fits univariate PH distributions via EM.

Feedback and contributions welcome!

---

<div class="post-metadata">

### Author: ![tp2750](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tp2750/32/207806_2.png) [@tp2750](https://discourse.julialang.org/u/tp2750)
#### Post date: [June 25, 2026, 10:27am UTC](https://discourse.julialang.org/t/ann-phasetypedistributions-jl-phasetypedistributionsfitting-jl-and-fixedsparsitymatrices-jl/137631/2 "2026-06-25T10:27:55Z")

</div>

Very nice. Thanks for sharing!
