kumulant

NormalGammaPosterior

@Serializable
@SerialName(value = "NormalGammaPosterior")
data object NormalGammaPosterior : Posterior<WeightedVarianceResult> (source)

Normal-Gamma posterior over a normal mean/variance. Draws (variance, mean) jointly: variance ~ Inverse-Gamma(n/2, n*s^2/2), mean | variance ~ Normal(snapshot.mean, sigma^2/n).

Re-draws on non-finite intermediates rather than returning NaN. The snapshot must be prior-seeded (n > 0); an unseeded snapshot will spin.

Functions

Link copied to clipboard
open override fun sample(snapshot: WeightedVarianceResult, rng: Random): Double

Draw a single Monte Carlo sample of the arm's reward from its posterior.

sample

open override fun sample(snapshot: WeightedVarianceResult, rng: Random): Double(source)

Draw a single Monte Carlo sample of the arm's reward from its posterior.