Class Aph2_fitallKt
-
- All Implemented Interfaces:
public final class Aph2_fitallKt
-
-
Method Summary
Modifier and Type Method Description final static Map<Integer, MatrixCell>
aph2_fitall(Double M1, Double M2, Double M3)
Fits a set of acyclic phase-type (APH) distributions with two phases (APH(2)) to match the given moments of a random variable. -
-
Method Detail
-
aph2_fitall
final static Map<Integer, MatrixCell> aph2_fitall(Double M1, Double M2, Double M3)
Fits a set of acyclic phase-type (APH) distributions with two phases (APH(2)) to match the given moments of a random variable.
This method approximates a random variable with multiple APH(2) distributions using the first three moments: the mean (M1), the second moment (M2), and the third moment (M3). The method checks the feasibility of these moments and computes the parameters for possible APH(2) distributions. If the moments cannot be exactly matched, an approximate APH(2) distribution is returned.
The method first calculates the squared coefficient of variation (SCV) and the lower bound for M3 (M3lb) based on the moments. It then determines the number of solutions (n) and computes the parameters (h1, h2, r1) for the APH(2) distributions. Valid distributions are stored in the map
APHS
, with each entry keyed by an integer and containing a MatrixCell representing the transition matricesD0
andD1
.- Parameters:
M1
- the first moment (mean) of the distributionM2
- the second moment of the distributionM3
- the third moment of the distribution- Returns:
a map containing possible APH(2) distributions, each represented by a MatrixCell
-
-
-
-