scipy.special.fdtridfd#
- scipy.special.fdtridfd(dfn, p, x, out=None) = <wrapped_ufunc 'fdtridfd'>#
Inverse to
fdtrvs dfd.Finds the F density argument dfd such that
fdtr(dfn, dfd, x) == p.- Parameters:
- dfnarray_like
First parameter (positive float).
- parray_like
Cumulative probability, in [0, 1].
- xarray_like
Argument (nonnegative float).
- outndarray, optional
Optional output array for the function values
- Returns:
- dfdscalar or ndarray
dfd such that
fdtr(dfn, dfd, x) == p.
See also
fdtrF distribution cumulative distribution function
fdtrcF distribution survival function
fdtriF distribution quantile function
scipy.stats.fF distribution
Notes
Array API Standard Support
fdtridfdhas support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.Library
CPU
GPU
NumPy
✅
n/a
CuPy
n/a
⛔
PyTorch
✅
⛔
JAX
✅
⛔
Dask
✅
n/a
For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support
out, but typically none of the other ufunc kwargs.outis typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend.outis never supported for JAX because JAX arrays are immutable.fdtridfddoes not currently supportoutfor the PyTorch backend.See Array API coverage for more information.
Examples
Compute the F distribution cumulative distribution function for one parameter set.
>>> from scipy.special import fdtridfd, fdtr >>> dfn, dfd, x = 10, 5, 2 >>> cdf_value = fdtr(dfn, dfd, x) >>> cdf_value 0.7700248806501017
Verify that
fdtridfdrecovers the original value for dfd:>>> fdtridfd(dfn, cdf_value, x) 5.0