Poissonization Error Bound (Raw Sum of Squared Probabilities)
Source:R/13_error_bounds.R
compute_sum_p_squared.RdComputes the raw sum of squared Bernoulli probabilities: $$\sum_{i=2}^{J} p_i^2 = \alpha^2 [\psi_1(\alpha+1) - \psi_1(\alpha+J)]$$ where \(p_i = \alpha / (\alpha + i - 1)\).
Details
This quantity represents the "underdispersion gap" between the conditional variance of \(K_J | \alpha\) and a Poisson with the same mean.
From the Poisson-binomial representation, \(S_J = K_J - 1 = \sum_{i=2}^{J} I_i\) where \(I_i \sim \text{Bernoulli}(p_i)\).
This sum equals: $$\sum_{i=2}^{J} p_i^2 = \alpha^2 [\psi_1(\alpha+1) - \psi_1(\alpha+J)]$$ using the identity for sums of squared reciprocals.
See also
compute_poissonization_bound for the full Chen-Stein bound
Examples
# Compute raw sum for J=50, alpha=1
compute_sum_p_squared(J = 50, alpha = 1)
#> [1] 0.6251327
# Vectorized over alpha
compute_sum_p_squared(J = 50, alpha = c(0.5, 1, 2))
#> [1] 0.2287007 0.6251327 1.5020688