Skip to main content
`Ctrl`+`K`

# scipy.special.chndtrix

scipy.special.chndtrix(p, df, nc, out=None) = <ufunc 'chndtrix'>

  Inverse to `chndtr` vs x.

  Calculated using a search to find a value for x that produces the desired value of p.

  Parameters:
    p array_like

      Probability; must satisfy `0 <= p < 1`

    df array_like

      Degrees of freedom; must satisfy `df > 0`

    nc array_like

      Non-centrality parameter; must satisfy `nc >= 0`

    out ndarray, optional

      Optional output array for the function results

  Returns:
    x scalar or ndarray

      Value so that the probability a non-central Chi square random variable with df degrees of freedom and non-centrality, nc, is greater than x equals p.

  See also

  `chndtr`

    Noncentral chi-squared distribution CDF

  `chndtridf`

    inverse of `chndtr` with respect to cdf

  `chndtrinc`

    inverse of `chndtr` with respect to nc

  `scipy.stats.ncx2`

    Non-central chi-squared distribution

  Notes

  The noncentral chi squared distribution is also available in `scipy.stats.ncx2`. `scipy.stats.ncx2.ppf` is equivalent to `chndtrix`.

  This function wraps routines from the Boost Math C++ library [1].

  References

  [1]

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

  Examples

      >>> from scipy.special import chndtrix, chndtr

  Compute the noncentral chi squared distribution CDF at one point. >>> x, df, nc = 3, 5, 10 >>> p = chndtr(x, df, nc)

  `chndtrix` is the inverse of `chndtr` with respect to x:

      >>> chndtrix(p, df, nc)
      3.0