scipy.special.ncfdtri — SciPy v1.15.2 Manual (original) (raw)

scipy.special.ncfdtri(dfn, dfd, nc, p, out=None) = <ufunc 'ncfdtri'>#

Inverse with respect to f of the CDF of the non-central F distribution.

See ncfdtr for more details.

Parameters:

dfnarray_like

Degrees of freedom of the numerator sum of squares. Range (0, inf).

dfdarray_like

Degrees of freedom of the denominator sum of squares. Range (0, inf).

ncarray_like

Noncentrality parameter. Range [0, inf).

parray_like

Value of the cumulative distribution function. Must be in the range [0, 1].

outndarray, optional

Optional output array for the function results

Returns:

fscalar or ndarray

Quantiles, i.e., the upper limit of integration.

Notes

This function calculates the Quantile of the non-central f distribution using the Boost Math C++ library [1].

Note that argument order of ncfdtri is different from that of the similar ppf method of scipy.stats.ncf. p is the last parameter of ncfdtri but the first parameter of scipy.stats.ncf.ppf.

References

Examples

from scipy.special import ncfdtr, ncfdtri

Compute the CDF for several values of f:

f = [0.5, 1, 1.5] p = ncfdtr(2, 3, 1.5, f) p array([ 0.20782291, 0.36107392, 0.47345752])

Compute the inverse. We recover the values of f, as expected:

ncfdtri(2, 3, 1.5, p) array([ 0.5, 1. , 1.5])