Skip to content

Main content

Discrete Cdf Inverse Flat Step Policy Tool

Compute discrete cdf inverse flat step policy from explicit bounded inputs.

Loading tool…

Description

Find the first cdf entry greater than mass if strict, otherwise greater than or equal to mass.

Event probabilities and probability masses lie between zero and one. Marginals, intersections, conditioning events, and endpoint atoms describe different quantities. A probability bound or local consistency check can constrain a model without specifying its complete distribution or dependence structure.

Find the first cdf entry greater than mass if strict, otherwise greater than or equal to mass.

When to use this tool

Use Discrete Cdf Inverse Flat Step Policy when you need the stated event identity, boundary policy, distribution component, or local feasibility check.

How to use the tool and how it works

  1. Enter cdf, values, mass, strict. Keep parallel arrays aligned. 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 found, value, index. Inspect found before interpreting the associated values.

Require equal nonempty values and cdf arrays with cdf nondecreasing within zero through one. Find the first cdf entry greater than mass if strict, otherwise greater than or equal to mass. Return found, the associated value, and its zero-based index; no match yields value=0 and index=-1.1

Input fieldMeaning and unitsAccepted input
cdfCdfRequired. Array of finite number; maximum items 256.
valuesValuesRequired. Array of finite number; maximum items 256.
massCDF probability threshold, not an outcome or atom mass.Required. Finite number; minimum 0; maximum 1.
strictSelect the first CDF entry > mass when true, otherwise >= mass.Required. Boolean.
Output fieldInterpretationReturned shape
foundFoundRequired. Boolean.
valueMatched supplied value, or zero when found=false.Required. Finite number.
indexZero-based matched index, or -1 when not found.Required. Safe integer.
json
{
  "input": {
    "cdf": [
      0.25,
      0.25,
      1
    ],
    "values": [
      1,
      2,
      3
    ],
    "mass": 0.25,
    "strict": true
  },
  "output": {
    "found": true,
    "value": 3,
    "index": 2
  }
}

Limitations and assumptions

  • Values are not checked for sorting and the last CDF value need not be one. At mass zero the non-strict policy can select a leading zero-mass entry; flat-step and endpoint behavior depend on strict.
  • 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 full probability table or distribution when a local mass, bound, or identity is insufficient. Specify dependence, conditioning, support order, and endpoint policy before combining terms.

References

  1. Calculation and input contract: probability/discrete-cdf-inverse-flat-step-policy — tool.io

Similar or alternative tools