Package jline.api.sim

Class Sim_fquest

java.lang.Object
jline.api.sim.Sim_fquest

public final class Sim_fquest extends Object
Fixed-sample-size confidence interval for a steady-state quantile, FQUEST.

Takes a single simulation sample path of arbitrary fixed length and returns a point estimate and an interval for the p-quantile of the steady-state marginal distribution. No sequential control of the run length is needed, which is the point: a dataset already in hand can be analyzed.

The procedure has four blocks.

  • Warmup. Starting from b = b0 and m = m0 it computes the b signed STS areas of the batched quantile process and tests them for randomness with von Neumann's ratio at the decaying significance beta*exp(-eta*(l-1)^theta) on iteration l, growing m by sqrt(2) whenever the test rejects. Passing means the areas are approximately independent, so any initialization bias is confined to the first batch.
  • Truncation. The first batch is deleted. That is the entire warmup treatment; there is no separate transient detector.
  • Batch-count selection. With b stepping down through s and m = nStar/b, four tests must pass in order: von Neumann and Shapiro-Wilk on the signed areas, then von Neumann and Shapiro-Wilk on the batched quantile estimators. These check the asymptotic properties the interval rests on, that both the areas and the batch quantiles behave like independent normal variates. b only ever decreases and a failure at the smallest entry of s ends the stage.
  • Delivery. When all four pass the interval is ytilde_p(n*) +- t_{1-alpha/2,2b-1} sqrt(V_p(w;b,m)/n*). Otherwise the sample was too small, QuantileCIResult.heuristic is true, and with QuestOptions.force the interval is the conservative fallback of SimQuestHeuristic.

Coverage was measured on the article's own test bed, the waiting-time process of an M/M/1 queue with lambda = 0.8, mu = 1 started with 113 jobs in system, over 500 independent replications at N = 200000, giving a standard error near 1%: 95.2% at p = 0.5, 96.2% at p = 0.9 and 95.6% at p = 0.99 against a nominal 95%. The delivered half-width exceeds the empirically needed one by factors of 1.16, 1.24 and 1.99 respectively, so the interval is conservative and increasingly so into the tail, consistent with the half-widths the article reports. On i.i.d. Exp(1) data, where sigma_p^2 = p(1-p)/f(y_p)^2 is exact, both A_p and N_p are unbiased to within 7%.

Two properties are worth knowing. Coverage is not monotone in the sample size over this range: a larger sample passes the stage tests more often and so reaches the conservative fallback less. And a substantial fraction of runs takes that fallback at all, 22% to 65% here and rising with p, so a delivered interval may well be the heuristic one; QuantileCIResult.heuristic says which. Fewer than about 100 replications cannot resolve a two-point difference in coverage, so do not read a small experiment as a defect.

Applicability is a condition on the output process, not on the model that produced it. The theory needs geometric moment contraction (Wu 2005), which holds for ARMA series, a broad class of short-range-dependent linear and nonlinear processes, many Markov chains, and was proved for M/M/1 and non-heavy-tailed G/G/1 waiting times by Dingec et al. (2022); a density that is positive and differentiable at the quantile of interest; short-range dependence and an FCLT for the indicator process. M/M/1 is only the validation bed, chosen because its exact quantiles are known.

Two practical exclusions follow. Do not use this on integer-valued output such as a queue length: the marginal has no density, the density-regularity condition fails, and the batched quantile has no Bahadur representation. Use it on continuous output, that is response, waiting and sojourn times. And heavy-tailed service, which can break geometric moment contraction and induce long-range dependence, is outside the theory.

Port of MATLAB sim_fquest.m.

Reference: A. Lolos, C. Alexopoulos, D. Goldsman, K. D. Dingec, A. C. Mokashi, J. R. Wilson, "A Fixed-Sample-Size Method for Estimating Steady-State Quantiles", Proc. Winter Simulation Conference, 2023.

Since:
LINE 3.1.0
  • Method Details

    • sim_fquest

      public static QuantileCIResult sim_fquest(double[] y, double p)
      Runs FQUEST at nominal 95% coverage with the default constants.
      Parameters:
      y - the sample path
      p - quantile probability in (0,1)
      Returns:
      the point estimate and interval
    • sim_fquest

      public static QuantileCIResult sim_fquest(double[] y, double p, double alpha)
      Runs FQUEST with the default constants.
      Parameters:
      y - the sample path
      p - quantile probability in (0,1)
      alpha - significance level in (0,1)
      Returns:
      the point estimate and interval
    • sim_fquest

      public static QuantileCIResult sim_fquest(double[] y, double p, double alpha, QuestOptions options)
      Runs FQUEST.
      Parameters:
      y - the sample path
      p - quantile probability in (0,1)
      alpha - significance level in (0,1)
      options - procedure constants
      Returns:
      the point estimate and interval