Description
Return log2(posterior/prior) for prior and posterior in (0, 1].
Pointwise information gains compare the probability assigned to one observation under two models or states. Their sign can be negative even when an associated average divergence is nonnegative.
Return log2(posterior/prior) for prior and posterior in (0, 1].
When to use this tool
Use Single Symbol Information Gain Reference when you need a supplied single-event probability-ratio term.
How to use the tool and how it works
- Enter posterior, prior. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gainBits. Use the output convention below.
Return log2(posterior/prior) for prior and posterior in (0, 1].1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| posterior | Posterior | Required. Finite number. |
| prior | Prior | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gainBits | Gain Bits | Required. Finite number. |
json
{
"input": {
"posterior": 0.5,
"prior": 0.25
},
"output": {
"gainBits": 1
}
} Limitations and assumptions
- The pointwise gain can be negative; this is not an average divergence, Bayesian update, or evidence of causal information gain.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate the full models and aggregate over the intended distribution before interpreting an overall gain.
References
Similar or alternative tools
- Pointwise Log Likelihood Ratio
Return ln(firstProbability/secondProbability)/ln(logBase).
- Probability Quantization Surprisal Error
Return log2(original/quantized) for both probabilities in (0, 1].