binomial_cdf

std.stats.binomial_cdf · Level L5

The probability of at most k successes in k + m independent trials with success probability p (m ≥ 1): I_{1−p}(m, k + 1).

P(K ≤ k) = I_{1−p}(m, k + 1), n = k + m

Signature

binomial_cdf(k: i64[n], m: i64[n], prob: f64[n]) → f64[n]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

mi64[n]ki64[n]1probf64[n]1.0Addk1SubtractqBetaIncppf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference Σ_{j≤k} C(n, j)·pʲ·(1 − p)ⁿ⁻ʲ, summed directly to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 162 float64 results inside the running error bound; the closest uses 6% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
31%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
114

Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.

Identity

Calls
—
Called by
—
sha256:7fcb4b17d03f602bf5d713be23772a9994e4a0c07a3faef175c350ae7e081a37

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.