Skip to content

Main content

Categorical Atom Odds Factor Tool

Compute one atom’s normalized probability and odds from supplied nonnegative categorical masses.

Loading tool…

Description

Compute one atom’s normalized probability and odds from supplied nonnegative categorical masses.

A binary probability p corresponds to odds p/(1-p). Evidence updates can multiply prior odds by a likelihood ratio, or normalize likelihood-weighted priors. Likelihood densities can exceed one, while event probabilities cannot; compatible observation definitions and measurement bases matter before combining them.

Compute one atom’s normalized probability and odds from supplied nonnegative categorical masses.

When to use this tool

Use Categorical Atom Odds Factor when you need the stated odds conversion, binary update, or normalization of compatible supplied weights.

How to use the tool and how it works

  1. Enter masses, selected. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read normalizedProbability, odds. Use the output convention below.

For nonnegative masses and a valid selected index compute the selected atom and the sum of all other masses. Require positive remaining mass; return normalizedProbability=atom/(atom+rest) and odds=atom/rest. If raw sums overflow, first divide masses by their maximum and apply the same calculation.1

Input fieldMeaning and unitsAccepted input
massesMassesRequired. Array of finite number; minimum 0; maximum items 256.
selectedZero-based index of the selected category.Required. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
normalizedProbabilityNormalized ProbabilityRequired. Finite number.
oddsOddsRequired. Finite number.
json
{
  "input": {
    "masses": [
      2,
      3,
      5
    ],
    "selected": 1
  },
  "output": {
    "normalizedProbability": 0.3,
    "odds": 0.42857142857142855
  }
}

Limitations and assumptions

  • Inputs are unnormalized weights. A sole positive selected category is rejected rather than represented with infinite odds; very unequal scaled weights can underflow and fail the remaining-mass check.
  • 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. Signed zero is exported as zero.

Alternative or Complementary methods

Use a complete likelihood model and an explicit hypothesis space when supplied weights cannot be justified independently. For extreme products, a log-domain calculation can reduce avoidable underflow.

References

  1. Calculation and input contract: probability/categorical-atom-odds-factor — tool.io

Similar or alternative tools