student_t_quantile

std.stats.student_t_quantile · Level L5

Student's t distribution's quantile with ν degrees of freedom, through the inverse incomplete beta function: with z = I⁻¹_{2·min(p, 1−p)}(ν/2, ½), x = ±√(ν(1 − z)/z), negative below the median.

z = I⁻¹_{2·min(p, 1−p)}(ν/2, ½), x = ±√(ν(1 − z)/z)

Signature

student_t_quantile(p: f64[n], nu: 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]nuf64[]1.00.5LessleftSubtractompMultiplyaMinimumtail2.0MultiplyqBetaIncInvzSubtractomzMultiplynumDividerSqrtmagNegatenegWherexxf64[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)/2)·₂F₁(½, (ν+1)/2; 3/2; −x²/ν)/(√(πν)·Γ(ν/2)) = p to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 128 float64 results inside the running error bound; the closest uses 14% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
5%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
3.0e+3

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 the t distribution's CDF for x, so neither the incomplete beta function nor its inverse is used to check itself.

Identity

Calls
—
Called by
—
sha256:ca5c9848754e35a94112c042d2b35f50b528fab49ad01dd8dcbf4f41a4a11733

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

Control handle

Symbol
Ω:std.stats.student_t_quantile · Ω:student_t_quantile
Pins
sha256:76b9babe8d9c9f1432b1311fadeecb6c23d90ea573380c5e7b00afba615b1076this graph alone
Evidence
sha256:0615330c311222fbb66a2d6f3d8402ace6dce2652f049eabbc6eed7a49f47395the 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.