Skip to content

Main content

Probability: Two Hypothesis Likelihood Weight Normalizer Tool

Normalize two nonnegative hypothesis likelihood weights against a supplied binary prior, rejecting zero evidence; likelihoods may be densities above one.

Loading tool…

Description

Normalize two nonnegative hypothesis likelihood weights against a supplied binary prior, rejecting zero evidence; likelihoods may be densities above one.

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.

Normalize two nonnegative hypothesis likelihood weights against a supplied binary prior, rejecting zero evidence; likelihoods may be densities above one.

When to use this tool

Use Probability: Two Hypothesis Likelihood Weight Normalizer 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 firstLikelihood, secondLikelihood, firstPrior. 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 result. Expand result to inspect the returned fields.

Form a=firstLikelihood*firstPrior and b=secondLikelihood*(1-firstPrior). Require nonnegative likelihoods, a prior within zero through one, and positive a+b; return evidence=a+b and posterior weights a/evidence and b/evidence inside result.1

Input fieldMeaning and unitsAccepted input
firstLikelihoodNonnegative first-hypothesis likelihood or density; may exceed one.Required. Finite number.
secondLikelihoodNonnegative second-hypothesis likelihood on the same observation/measure basis.Required. Finite number.
firstPriorFirst-hypothesis probability; the second prior is one minus this.Required. Finite number.
Output fieldInterpretationReturned shape
resultObject containing the calculated result members described below.Required. Object.
result.firstPosteriorFirst PosteriorCalculated result member: number.
result.secondPosteriorSecond PosteriorCalculated result member: number.
result.evidenceEvidenceCalculated result member: number.
json
{
  "input": {
    "firstLikelihood": 0.8,
    "secondLikelihood": 0.2,
    "firstPrior": 0.5
  },
  "output": {
    "result": {
      "firstPosterior": 0.8,
      "secondPosterior": 0.2,
      "evidence": 0.5
    }
  }
}

Limitations and assumptions

  • Likelihoods can be densities above one; both must use a compatible observation and measure. Zero evidence is an input-domain error, and the two hypotheses are treated as exhaustive.
  • Outputs are nested inside result. 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/two-hypothesis-likelihood-weight-normalizer — tool.io

Similar or alternative tools