Skip to contents

Computes \(E(w_1 \mid a, b)\) via Gauss-Laguerre quadrature.

Usage

mean_w1(a, b, M = .QUAD_NODES_DEFAULT)

Arguments

a

Numeric; shape parameter of the Gamma prior on \(\alpha\) (a > 0).

b

Numeric; rate parameter of the Gamma prior on \(\alpha\) (b > 0).

M

Integer; number of quadrature nodes. Default is 80.

Value

Numeric; \(E(w_1)\).

Details

The expectation is computed using the identity: $$E[w_1 | a, b] = E\left[\frac{1}{1+\alpha}\right] = I_1(a, b)$$

where the integral is evaluated via Gauss-Laguerre quadrature.

Key identity: \(E(w_1 \mid a, b) = E(\rho \mid a, b)\), where \(\rho = \sum_h w_h^2\) is the co-clustering probability.

References

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

Examples

mean_w1(a = 2, b = 1)       # ~0.404
#> [1] 0.4036526
mean_w1(a = 1.6, b = 1.22)  # ~0.508
#> [1] 0.508368