Goal
As a user calling .q(p) on StudentT with small degrees of freedom (nu) and p very close to 0 or 1, the returned quantile should be monotonically non-decreasing in p and have the mathematically correct sign, instead of silently returning a negative value when the true quantile is a large positive number (or exhibiting a large non-monotonic jump between adjacent p values).
Scope
src/dist/student-t.js — the closed-form _q(p) implementation.
Acceptance Criteria
new dist.StudentT(2).q(p) is non-decreasing for p sampled densely in the extreme lower tail (e.g. p in [1e-6, 1e-5]), to within numerical tolerance.
new dist.StudentT(0.15615547442198802).q(0.9999876066169184) returns a large positive value consistent with the independently mpmath-verified true quantile (~6.5e28), not a negative value.
- Round-trip
|cdf(q(p)) - p| and the monotonicity hard-failure check in scripts/difftest-quantile.py's round-trip sweep pass for StudentT across the extended tail range.
- No regression in existing StudentT precision-gate / reference values for interior
p.
Out of Scope
General closed-form quantile approximation redesign for all nu ranges — only the small-nu extreme-tail regime identified by this sweep.
Goal
As a user calling
.q(p)onStudentTwith small degrees of freedom (nu) andpvery close to 0 or 1, the returned quantile should be monotonically non-decreasing inpand have the mathematically correct sign, instead of silently returning a negative value when the true quantile is a large positive number (or exhibiting a large non-monotonic jump between adjacentpvalues).Scope
src/dist/student-t.js— the closed-form_q(p)implementation.Acceptance Criteria
new dist.StudentT(2).q(p)is non-decreasing forpsampled densely in the extreme lower tail (e.g.pin[1e-6, 1e-5]), to within numerical tolerance.new dist.StudentT(0.15615547442198802).q(0.9999876066169184)returns a large positive value consistent with the independently mpmath-verified true quantile (~6.5e28), not a negative value.|cdf(q(p)) - p|and the monotonicity hard-failure check inscripts/difftest-quantile.py's round-trip sweep pass for StudentT across the extended tail range.p.Out of Scope
General closed-form quantile approximation redesign for all
nuranges — only the small-nuextreme-tail regime identified by this sweep.