Skip to main content
`Ctrl`+`K`

# scipy.special.ncfdtri

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:
    dfn array_like

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

    dfd array_like

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

    nc array_like

      Noncentrality parameter. Range [0, inf).

    p array_like

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

    out ndarray, optional

      Optional output array for the function results

  Returns:
    f scalar or ndarray

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

  See also

  `ncfdtr`

    CDF of the non-central F distribution.

  `ncfdtridfd`

    Inverse of `ncfdtr` with respect to dfd.

  `ncfdtridfn`

    Inverse of `ncfdtr` with respect to dfn.

  `ncfdtrinc`

    Inverse of `ncfdtr` with respect to nc.

  `scipy.stats.ncf`

    Non-central F distribution.

  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

  [1]

  The Boost Developers. “Boost C++ Libraries”. https://www.boost.org/.

  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])