Skip to contents

Computes or bounds \(P(W_{max}>threshold)\) without conflating it with the first size-biased tail \(P(W_{SB}>threshold)\). For thresholds at least 0.5, method = "auto" uses a stable one-dimensional integral and an independent calculation. Below 0.5, deterministic direct evaluation is intentionally deferred and "auto" returns certified bounds only. Explicit seeded Monte Carlo is available at every threshold and uses an exact GEM stopping rule, so its only approximation is sampling error.

Usage

prob_wmax_exceeds(
  threshold,
  alpha = NULL,
  a = NULL,
  b = NULL,
  method = c("auto", "deterministic", "bounds", "monte_carlo"),
  rel_tol = 1e-10,
  abs_tol = 1e-12,
  subdivisions = 1000L,
  n = 250000L,
  seed = NULL,
  conf_level = 0.95,
  max_sticks = 100000L,
  warn_low_successes = TRUE
)

Arguments

threshold

One finite probability in the closed unit interval.

alpha

Optional fixed positive DP concentration.

a, b

Optional positive Gamma shape and rate for alpha.

method

One of "auto", "deterministic", "bounds", or "monte_carlo".

rel_tol, abs_tol

Positive numerical tolerances. Deterministic public results require rel_tol <= 1e-10 and abs_tol <= 1e-12.

subdivisions

Positive integration subdivision limit.

n

Monte Carlo draw count; the default supports a worst-case normal 95-percent half-width of about 0.002.

seed

Required non-negative integer for Monte Carlo.

conf_level

Monte Carlo confidence level in the open unit interval.

max_sticks

Maximum GEM iterations. Reaching it produces an explicit failed result; an unresolved remainder is never discarded.

warn_low_successes

Whether to warn when fewer than 25 exceedances are observed.

Value

A wmax_tail_result with the named estimand, conditioning, direct estimate (when available), direct numerical/sampling interval, absolute-error statement, universal certified bounds, status, verification flag, method, and provenance. A bounds-only result has estimate = NA and usable = FALSE; neither certified endpoint is used as an estimate. Its certified interval remains available with bounds_usable = TRUE, or directly from wmax_tail_bounds().

Examples

prob_wmax_exceeds(0.5, alpha = 1) # log(2)
#> Largest DP population weight tail (W_max)
#>   Status: converged
#>   Verified: yes
#>   Method used: one_dimensional_quadrature_verified_by_positive_series
#>   Conditioning: fixed alpha = 1
#>   Threshold: 0.5
#>   Estimate: 0.693147
#>   Reported interval: [0.693147, 0.693147]
#>   Certified W_max bounds: [0.5, 1]
#>   First size-biased tail P(W_SB > threshold): 0.5
prob_wmax_exceeds(0.9, a = 2, b = 1)
#> Largest DP population weight tail (W_max)
#>   Status: converged
#>   Verified: yes
#>   Method used: one_dimensional_quadrature_verified_by_gamma_quadrature_of_conditional_series
#>   Conditioning: Gamma(shape = 2, rate = 1)
#>   Threshold: 0.9
#>   Estimate: 0.0950053
#>   Reported interval: [0.0950053, 0.0950053]
#>   Certified W_max bounds: [0.0916837, 0.101871]
#>   First size-biased tail P(W_SB > threshold): 0.0916837
prob_wmax_exceeds(0.4, alpha = 1) # certified bounds only
#> Largest DP population weight tail (W_max)
#>   Status: approximate
#>   Verified: no
#>   Method used: certified_bounds_only
#>   Conditioning: fixed alpha = 1
#>   Threshold: 0.4
#>   Estimate: unavailable
#>   Reason: deterministic_method_unsupported_below_half
#>   Certified W_max bounds: [0.6, 1]
#>   First size-biased tail P(W_SB > threshold): 0.6