Information
Entropy and expected information gain in micro-bits (1_000_000 is one bit). Every figure is an integer: log2 is exact for powers of two and otherwise within 2 micro-bits of the true value (the error of FixedPoint.ln plus one division rounded to nearest), and each entropy term is rounded to nearest, ties up.
Functions
Link copied to clipboard
One branch per outcome with its probability and the posterior after seeing it. Bayes over integers: joint = prior times likelihood, then largest-remainder normalization, so both the probabilities and each posterior sum to exactly 1_000_000. An outcome no hypothesis can produce has probability 0 and leaves the prior unchanged.