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
- Enter cdf, values, mass, strict. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| cdf | Cdf | Required. Array of finite number; maximum items 256. |
| values | Values | Required. Array of finite number; maximum items 256. |
| mass | CDF probability threshold, not an outcome or atom mass. | Required. Finite number; minimum 0; maximum 1. |
| strict | Select the first CDF entry > mass when true, otherwise >= mass. | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| found | Found | Required. Boolean. |
| value | Matched supplied value, or zero when found=false. | Required. Finite number. |
| index | Zero-based matched index, or -1 when not found. | Required. Safe integer. |
{
"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
Similar or alternative tools
- Probability: Discrete Cdf Jump Size
Recover a discrete atom probability from one supplied left limit and right-continuous CDF value, enforcing monotonic probability bounds.
- Categorical Resampling One Bin Boundary
Check whether a supplied value belongs to one categorical probability bin, with an explicit final-bin endpoint rule.