Package jline.lib.kpctoolbox.mvph
Class MVPHKt
-
- All Implemented Interfaces:
public final class MVPHKt
-
-
Method Summary
Modifier and Type Method Description final static Doublemvph_joint(DoubleArray alpha, Matrix S, Matrix T, Matrix D, Integer n1, Integer n2)Computes the joint moment EX^n1 * Y^n2 of a bivariate phase-type distribution. final static Doublemvph_mean_x(DoubleArray alpha, Matrix S, Matrix T, Matrix D)Computes the mean of the first variable in a bivariate PH distribution. final static Doublemvph_mean_y(DoubleArray alpha, Matrix S, Matrix T, Matrix D)Computes the mean of the second variable in a bivariate PH distribution. final static Doublemvph_cov(DoubleArray alpha, Matrix S, Matrix T, Matrix D)Computes the covariance of a bivariate PH distribution. final static Doublemvph_corr(DoubleArray alpha, Matrix S, Matrix T, Matrix D)Computes the correlation of a bivariate PH distribution. -
-
Method Detail
-
mvph_joint
final static Double mvph_joint(DoubleArray alpha, Matrix S, Matrix T, Matrix D, Integer n1, Integer n2)
Computes the joint moment EX^n1 * Y^n2 of a bivariate phase-type distribution.
The bivariate phase-type distribution has:
Initial vector alpha
First phase transition matrix S (for X)
Transition matrix D between phases (from X completion to Y start)
Second phase transition matrix T (for Y)
Formula: EX^n1 * Y^n2 = n1! * n2! * alpha * inv(-S)^(n1+1) * D * inv(-T)^(n2+1) * (-T) * e
- Parameters:
alpha- Initial probability vectorS- First phase generator matrix (for X)T- Second phase generator matrix (for Y)D- Transition matrix between phasesn1- Power for first variable Xn2- Power for second variable Y- Returns:
Joint moment EX^n1 * Y^n2
-
mvph_mean_x
final static Double mvph_mean_x(DoubleArray alpha, Matrix S, Matrix T, Matrix D)
Computes the mean of the first variable in a bivariate PH distribution. EX = mvph_joint(alpha, S, T, D, 1, 0)
-
mvph_mean_y
final static Double mvph_mean_y(DoubleArray alpha, Matrix S, Matrix T, Matrix D)
Computes the mean of the second variable in a bivariate PH distribution. EY = mvph_joint(alpha, S, T, D, 0, 1)
-
mvph_cov
final static Double mvph_cov(DoubleArray alpha, Matrix S, Matrix T, Matrix D)
Computes the covariance of a bivariate PH distribution. Cov(X, Y) = EXY - EX*EY
-
-
-
-