Stats distributions studentisf - CyrilB1531/lodestar GitHub Wiki

Development build. This page describes main, not a released package. The latest published Lodestar.Stats is 0.5.0 โ€” read its documentation.

Home โ€บ Stats โ€บ Distribution tails

Distributions.StudentIsf

The t with P(T > t) = p: the inverse of StudentSf.

public static double StudentIsf(double p, double df)

Parameters โ€” p is a probability in [0, 1]; 0 answers +โˆž and 1 answers โˆ’โˆž. df is the degrees of freedom, which must be positive; +โˆž is the standard normal law, as scipy's is.

Returns โ€” scipy.stats.t.isf(p, df), except where the root lies past the largest double, at a df below 1.05 and p near one half or tiny: ยฑโˆž there, where scipy answers finite values that are roots of no tail (t.isf(0.4, 1e-300) is 6703.9), and every p but one half from df 1e-20 down (#1690).

Exceptions โ€” ArgumentOutOfRangeException when p is outside [0, 1], NaN included, or when df is not positive.

Example โ€” the upper 2.5% point on twelve degrees of freedom.

using Lodestar.Stats;

double upper = Distributions.StudentIsf(0.025, 12.0);   // => 2.178812โ€ฆ

Remarks โ€” The mirror of StudentQuantile. It reaches past 1.3e154: the Cauchy's (df = 1) point at 1e-300 is 1/(ฯ€ยท1e-300) = 3.18e299, which an overflowing tยฒ used to cap (#1158).

A point past the largest double, such as the 1e-300 point on half a degree of freedom near 1e600, is ยฑโˆž rather than ยฑ1.8e308.

Applies to โ€” net10.0, netstandard2.0.

See also โ€” Distributions.StudentQuantile, Distributions.StudentSf.