Skip to content

Main content

Bernoulli Log Likelihood Trial Tool

Return one finite Bernoulli log-likelihood term. An impossible observation is rejected because its negative-infinite log-likelihood is not portable JSON.

Loading tool…

Description

Validate probability in [0, 1] and require the observed outcome's probability positive.

Logarithms turn positive ratios into additive coordinates. An event log-likelihood uses the natural logarithm of the probability of the observed outcome; its sign and interpretation differ from negative log loss.

Validate probability in [0, 1] and require the observed outcome's probability positive.

When to use this tool

Use Bernoulli Log Likelihood Trial when you need one natural-log probability or positive-ratio component with explicit endpoint handling.

How to use the tool and how it works

  1. Enter probability, success. 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 logLikelihood. Use the output convention below.

Validate probability in [0, 1] and require the observed outcome's probability positive. Return ln(probability) for success or log1p(-probability) for failure.1

Input fieldMeaning and unitsAccepted input
probabilityProbabilityRequired. Finite number; minimum 0; maximum 1.
successSuccessRequired. Boolean.
Output fieldInterpretationReturned shape
logLikelihoodNatural logarithm of the probability of the observed outcome, in nats; this is not negative log loss.Required. Finite number.
json
{
  "input": {
    "probability": 0.5,
    "success": true
  },
  "output": {
    "logLikelihood": -0.6931471805599453
  }
}

Limitations and assumptions

  • The result is natural-log likelihood, not negative log loss; impossible observed endpoints are rejected rather than returned as negative infinity.
  • 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

Document the event model, reference quantity, logarithm base, and aggregation rule when interpreting the complete result.

References

  1. Calculation and input contract: probability/bernoulli-log-likelihood-trial — tool.io

Similar or alternative tools