Description
Return ln(firstProbability/secondProbability)/ln(logBase).
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 ln(firstProbability/secondProbability)/ln(logBase).
When to use this tool
Use Pointwise Log Likelihood Ratio when you need a supplied single-event probability-ratio term.
How to use the tool and how it works
- Enter firstProbability, secondProbability, logBase. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read logRatio. Use the output convention below.
Require both probabilities in (0, 1] and logBase > 1. Return ln(firstProbability/secondProbability)/ln(logBase).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstProbability | First Probability | Required. Finite number; maximum 1; strictly above 0. |
| secondProbability | Second Probability | Required. Finite number; maximum 1; strictly above 0. |
| logBase | Logarithm base; base 2 gives bits and base e gives nats under conventional bases greater than one. | Required. Finite number; strictly above 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| logRatio | Log Ratio | Required. Finite number. |
{
"input": {
"firstProbability": 0.5,
"secondProbability": 0.125,
"logBase": 2
},
"output": {
"logRatio": 2
}
} Limitations and assumptions
- The signed result concerns one observation; no likelihood model, normalization across observations, or statistical test is supplied.
- 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
- Single Symbol Information Gain Reference
Return log2(posterior/prior) for prior and posterior in (0, 1].
- Information: Information Density Single Joint Cell
Return [ln(joint) - ln(row) - ln(column)]/ln(base).