Class FJ_xmaxKt
-
- All Implemented Interfaces:
public final class FJ_xmaxKt
-
-
Method Summary
Modifier and Type Method Description final static Doublefj_xmax_exp(Integer K, Double mu)Expected maximum of K i.i.d. final static Doublefj_xmax_2(Double lambda1, Double lambda2)Expected maximum of 2 exponential random variables. final static Doublefj_xmax_2(Double lambda)Expected maximum of 2 i.i.d. final static Doublefj_xmax_erlang(Integer K, Integer k, Double mu)Expected maximum of K i.i.d. final static Doublefj_xmax_hyperexp(Integer K, Double p1, Double mu1, Double mu2)Expected maximum of K i.i.d. final static FJXmaxNormalResultfj_xmax_normal(Integer K, Double mu, Double sigma, String method)Expected maximum for normal distribution. final static Doublefj_xmax_pareto(Integer K, Double beta, Double k)Expected maximum for Pareto distribution. final static Doublefj_xmax_pareto(Integer K, Double beta)Expected maximum for Pareto distribution with default scale for mean = 1. final static Doublefj_xmax_pareto_char_max(Integer K, Double beta, Double k)Characteristic maximum M_K for Pareto distribution. final static Doublefj_xmax_approx(Integer K, Double muX, Double sigmaX, String distType)General approximation for expected maximum of K random variables. final static Doublefj_xmax_emma(Integer K, Double mu)Expected maximum using EMMA (Expected Maximum from Marginal Approximation). -
-
Method Detail
-
fj_xmax_exp
final static Double fj_xmax_exp(Integer K, Double mu)
Expected maximum of K i.i.d. exponential random variables.
X_K^max = H_K / mu
- Parameters:
K- Number of parallel servers (positive integer)mu- Service rate (mean service time is 1/mu)- Returns:
Expected maximum service time
-
fj_xmax_2
final static Double fj_xmax_2(Double lambda1, Double lambda2)
Expected maximum of 2 exponential random variables.
Y_2^max = 1/lambda1 + 1/lambda2 - 1/(lambda1 + lambda2)
For identical rates: Y_2^max = 1.5/lambda = H_2/lambda
- Parameters:
lambda1- Rate of first exponentiallambda2- Rate of second exponential (default: same as lambda1)- Returns:
Expected maximum Y_2^max
-
fj_xmax_2
final static Double fj_xmax_2(Double lambda)
Expected maximum of 2 i.i.d. exponential random variables (same rate).
- Parameters:
lambda- Rate of both exponentials- Returns:
Expected maximum Y_2^max = 1.5/lambda
-
fj_xmax_erlang
final static Double fj_xmax_erlang(Integer K, Integer k, Double mu)
Expected maximum of K i.i.d. Erlang-k random variables.
For k=2 (Erlang-2), uses the closed-form formula: X_K^max = (1/mu) * sum_{n=1}^{K} C(K,n) * (-1)^{n-1} * sum_{m=1}^{n} C(n,m) * m! / (2*n^{m+1})
For general k, uses numerical integration: X_K^max = integral_0^inf 1 - F_Erlang(t)^K dt
- Parameters:
K- Number of parallel servers (positive integer)k- Number of Erlang stages (positive integer)mu- Rate parameter per stage (mean service time = k/mu)- Returns:
Expected maximum service time
-
fj_xmax_hyperexp
final static Double fj_xmax_hyperexp(Integer K, Double p1, Double mu1, Double mu2)
Expected maximum of K i.i.d. Hyperexponential-2 random variables.
X_K^max = sum_{n=1}^{K} (-1)^{n+1} * sum_{m=0}^{n} C(n,m) * p1^m * p2^{n-m} / (m*mu1 + (n-m)*mu2)
- Parameters:
K- Number of parallel servers (positive integer)p1- Probability of branch 1 (0 < p1 < 1)mu1- Rate of branch 1mu2- Rate of branch 2- Returns:
Expected maximum service time
-
fj_xmax_normal
final static FJXmaxNormalResult fj_xmax_normal(Integer K, Double mu, Double sigma, String method)
Expected maximum for normal distribution.
Johnson et al. approximation: EY_K ~ mu + sigma * sqrt(2*ln(K)) - (ln(ln(K)) - ln(4*pi) + 2*gamma) / (2*sqrt(2*ln(K)))
Arnold approximation: EY_K ~ mu + sigma * sqrt(2*ln(K))
Corrected version adds Petzold bias correction: delta(K) = 0.1727 * K^(-0.2750)
Variance approximation: VarY_K ~ 1.64492 * sigma^2 / (2*ln(K))
- Parameters:
K- Number of random variables (K >= 2)mu- Mean of the normal distributionsigma- Standard deviationmethod- "johnson" (default), "arnold", or "corrected"- Returns:
FJXmaxNormalResult containing expected maximum and variance
-
fj_xmax_pareto
final static Double fj_xmax_pareto(Integer K, Double beta, Double k)
Expected maximum for Pareto distribution.
Pareto CDF: F(x) = 1 - (k / (k + x))^beta, x >= 0, beta 2
For the standardized Pareto with mean 1: k = beta - 1
- Parameters:
K- Number of random variables (positive integer)beta- Shape parameter (beta 2 required for finite moments)k- Scale parameter (default: beta - 1 for mean = 1)- Returns:
FJXmaxParetoResult containing expected maximum and characteristic maximum
-
fj_xmax_pareto
final static Double fj_xmax_pareto(Integer K, Double beta)
Expected maximum for Pareto distribution with default scale for mean = 1.
- Parameters:
K- Number of random variables (positive integer)beta- Shape parameter (beta 2)- Returns:
Expected maximum
-
fj_xmax_pareto_char_max
final static Double fj_xmax_pareto_char_max(Integer K, Double beta, Double k)
Characteristic maximum M_K for Pareto distribution.
m_K = k * (K^(1/beta) - 1) M_K = m_K + K * integral_{m_K}^{inf} S(x) dx
For Pareto: integral_{m_K}^{inf} (k/(k+x))^beta dx = k^beta * (k+m_K)^{1-beta} / (beta-1)
- Parameters:
K- Number of random variables (positive integer)beta- Shape parameter (beta 2)k- Scale parameter (default: beta - 1)- Returns:
Characteristic maximum M_K
-
fj_xmax_approx
final static Double fj_xmax_approx(Integer K, Double muX, Double sigmaX, String distType)
General approximation for expected maximum of K random variables.
X_K^max ~ mu_X + sigma_X * G(K)
G(K) depends on distribution type:
Exponential: G(K) = H_K - 1
Uniform: G(K) = sqrt(3) * (K-1) / (K+1)
EVD: G(K) = sqrt(6) * ln(K) / pi
General: G(K) <= (K-1) / sqrt(2K-1) (upper bound)
- Parameters:
K- Number of random variables (positive integer)muX- Mean of the distributionsigmaX- Standard deviation of the distributiondistType- Distribution type: "exp", "uniform", "evd", "bound"- Returns:
Expected maximum X_K^max
-
fj_xmax_emma
final static Double fj_xmax_emma(Integer K, Double mu)
Expected maximum using EMMA (Expected Maximum from Marginal Approximation).
Based on: [F_X(EY_K)]^K ~ phi = 0.570376 Therefore: EY_K ~ F^{-1}(phi^{1/K})
For exponential with rate mu: EY_K = -(1/mu) * ln(1 - phi^{1/K})
The constant phi = exp(-exp(-gamma)) ~ 0.570376.
- Parameters:
K- Number of random variables (positive integer)mu- Rate parameter for exponential distribution- Returns:
Approximate expected maximum
-
-
-
-