Stats distributions chisquaredisf - 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.ChiSquaredIsf
The x with P(X > x) = p: the inverse of ChiSquaredSf.
public static double ChiSquaredIsf(double p, double df)
Parameters — p is a probability in [0, 1]; 0 answers +∞ and 1 answers 0. df is the degrees of freedom, which must be positive and finite.
Returns — scipy.stats.chi2.isf(p, df).
Exceptions — ArgumentOutOfRangeException when p is outside [0, 1], NaN included, or when df is not positive. A df of 5e-324, whose half is not a double, is refused too (#1690).
Example — the 5% critical value of a test on four degrees of freedom.
using Lodestar.Stats;
double critical = Distributions.ChiSquaredIsf(0.05, 4.0); // => 9.487729…
Remarks — The mirror of ChiSquaredQuantile, inverting the upper tail directly so a small p keeps its digits.
Applies to — net10.0, netstandard2.0.
See also — Distributions.ChiSquaredQuantile, Distributions.ChiSquaredSf.