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

scipy.special.chdtriv(p, x, out=None) = <ufunc 'chdtriv'>#

Inverse to chdtr with respect to v.

Returns v such that chdtr(v, x) == p.

Parameters:

parray_like

Probability that the Chi square random variable is less than or equal to x.

xarray_like

Nonnegative input.

outndarray, optional

Optional output array for the function results.

Returns:

scalar or ndarray

Degrees of freedom.

References

Examples

import scipy.special as sc

It inverts chdtr.

p, x = 0.5, 1 sc.chdtr(sc.chdtriv(p, x), x) 0.5000000000202172 v = 1 sc.chdtriv(sc.chdtr(v, x), v) 1.0000000000000013