Class InferNhppKs

java.lang.Object
jline.api.infer.InferNhppKs

public final class InferNhppKs extends Object
Kolmogorov-Smirnov tests for a non-homogeneous Poisson arrival process.

THE CONDITIONAL-UNIFORM TRANSFORMATION. Conditional on the number of arrivals in the interval, the arrival times of an NHPP are the order statistics of iid variables with cdf Lambda(t)/Lambda(T). Mapping the data through that cdf turns ANY NHPP, whatever its rate, into iid uniforms, so one KS test covers every rate function.

WHY THE PLAIN TEST IS WEAK, AND WHAT FIXES IT. The CU KS test has "remarkably little power" against non-exponential interarrival times: it looks at the POSITIONS of the points, and those stay nearly uniform for many non-Poisson processes. Lewis (1965) applies the Durbin (1961) transformation first -- reorder the GAPS ascending, rescale each by how many gaps remain, cumulate -- which turns a difference in the gap DISTRIBUTION into a difference in position. Measured on 400 replications of an Erlang-4 renewal process, the CU test rejects at its own size while the Lewis test rejects essentially always.

Port of MATLAB infer_nhpp_ks.m.

Reference: S.-H. Kim, W. Whitt (2014). Are call center and hospital arrivals well modeled by nonhomogeneous Poisson processes? Manufacturing and Service Operations Management 16(3), 464-480; J. Durbin (1961), Biometrika 48, 41-55; P. A. W. Lewis (1965), JRSS B 27, 417-432.

Since:
LINE 3.1.0
  • Method Details

    • infer_nhpp_ks

      public static Map<String,Double> infer_nhpp_ks(double[] times, double T)
      The Lewis (Durbin-transformed) test with a constant rate.
      Parameters:
      times - the arrival times
      T - the right end of the observation interval
      Returns:
      map with statistic, pvalue and n
    • infer_nhpp_ks

      public static Map<String,Double> infer_nhpp_ks(double[] times, double T, DoubleUnaryOperator cumRate, String method, double T0)
      Parameters:
      times - the arrival times, within [T0,T]
      T - the right end of the observation interval
      cumRate - the cumulative rate Lambda(t), or null for a constant rate
      method - "cu" or "lewis"
      T0 - the left end of the observation interval
      Returns:
      map with statistic, pvalue and n