beta_quantile

std.stats.beta_quantile · Level L5

The beta distribution's quantile: the x with I_x(a, b) = p, the inverse incomplete beta function.

x = I⁻¹_p(a, b)

Signature

beta_quantile(p: f64[n], a: f64[], b: f64[]) → 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.

pf64[n]af64[]bf64[]BetaIncInvxxf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference the root of xᵃ(1−x)ᵇ·₂F₁(a+b, 1; a+1; x)/(a·B(a, b)) = p to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 156 float64 results inside the running error bound; the closest uses 22% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
11%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
69

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.

Note

The reference solves the hypergeometric form of I_x(a, b) for x, a different function from the continued fraction NOVA inverts.

Identity

Calls
—
Called by
—
sha256:773f181c4faa9c81e7faca26f37f45587fbc742854961346662c3759c64992bc

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

Control handle

Symbol
Ω:std.stats.beta_quantile · Ω:beta_quantile
Pins
sha256:f432347e636e476caa32f34e0d4ab037e598e9f9933cabc909d1009017cad3f3this graph alone
Evidence
sha256:5932b533816e3e021b0d93994b1135bec9954af739884a2efde95ae80f412946the hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.