chi2_quantile
std.stats.chi2_quantile · Level L5The chi-square distribution's quantile with k degrees of freedom: the x with F(x; k) = p, as 2·P⁻¹(k/2, p).
Signature
chi2_quantile(p: f64[n], k: i64[]) → 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.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Agrees with the reference
the root of the closed-form CDF: 1 − e^(−x/2)·Σ…, or erf(√(x/2)) − …to 80 digits (100-digit arithmetic), on all 40 test cases. - All 134 float64 results inside the running error bound; the closest uses 7% of it.
- Interpreter and NumPy backend return bit-identical results.
- correctly rounded (the float64 nearest the exact value)
- 13%
- bit-equal to the NumPy formula in float64
- 100%
- largest error, in units in the last place
- 22
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 chi-square CDF's closed forms (finite sums and erf) for x, so the inverse incomplete gamma function is checked against a different function, not against itself.
Identity
sha256:a519d3c798541dc0f5f659f0300918e08902e30892da896e53428eb842f8c182The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.stats.chi2_quantile · Ω:chi2_quantile
- Pins
sha256:7ccda5cd7595f8919846d10302a0da80511b955c15c0c32b7e097da39b3677c2this graph alone- Evidence
sha256:2dc44c04bd2168b220e3c23edfec00c26c03d6b4b82abc311e2ba515c3139abdthe 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.