Skip to contents

Computes 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)\).

Usage

compute_sum_p_squared(J, alpha)

Arguments

J

Integer; sample size (number of observations).

alpha

Numeric; concentration parameter (can be vectorized).

Value

Numeric vector; sum of squared probabilities for each alpha value.

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.

References

Lee, J. (2026). Design-Conditional Prior Elicitation for Dirichlet Process Mixtures. arXiv preprint arXiv:2602.06301.

See also

compute_poissonization_bound for the full Chen-Stein bound

Examples

if (FALSE) { # \dontrun{
# Compute raw sum for J=50, alpha=1
compute_sum_p_squared(J = 50, alpha = 1)

# Vectorized over alpha
compute_sum_p_squared(J = 50, alpha = c(0.5, 1, 2))

} # }