CDF of the First Size-Biased DP Weight
cdf_w1.RdComputes \(P(w_1 \le x \mid a, b)\) using the closed-form expression derived by marginalizing over \(\alpha \sim Gamma(a, b)\).
Details
The unconditional CDF is given by: $$F_{w_1}(x | a, b) = 1 - \left(\frac{b}{b - \log(1-x)}\right)^a$$
The implementation uses log1p and expm1 for numerical
stability, particularly when the CDF is close to 0 (small x).
Interpretation
The weight \(w_1\) is in GEM (size-biased) order, not ranked by size. It represents the asymptotic cluster share of a randomly chosen unit, not the largest cluster proportion. See Lee (2026, Section 4) for details.
References
Lee, J. (2026). Design-Conditional Prior Elicitation for Dirichlet Process Mixtures. arXiv preprint arXiv:2602.06301.
Vicentini, C. and Jermyn, I. H. (2025). Prior selection for the precision parameter of Dirichlet Process Mixtures. arXiv:2502.00864.
Examples
# P(w1 <= 0.3) under standard prior
cdf_w1(0.3, a = 2, b = 1)
#> [1] 0.4566891
# Vectorized computation
cdf_w1(c(0.1, 0.3, 0.5, 0.7), a = 1.6, b = 1.22)
#> [1] 0.1241267 0.3365805 0.5131689 0.6666263