scipy.special.nctdtrinc#

scipy.special.nctdtrinc(df, p, t, out=None) = <ufunc 'nctdtrinc'>#

Calculate non-centrality parameter for non-central t distribution.

See nctdtr for more details.

Parameters:
dfarray_like

Degrees of freedom of the distribution. Should be in range (0, inf).

parray_like

CDF values, in range (0, 1].

tarray_like

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

outndarray, optional

Optional output array for the function results

Returns:
ncscalar or ndarray

Noncentrality parameter

See also

nctdtr

CDF of the non-central t distribution.

nctdtrit

Inverse CDF (iCDF) of the non-central t distribution.

nctdtridf

Calculate degrees of freedom, given CDF and iCDF values.

Examples

>>> from scipy.special import nctdtr, nctdtrinc

Compute the CDF for several values of nc:

>>> nc = [0.5, 1.5, 2.5]
>>> p = nctdtr(3, nc, 1.5)
>>> p
array([0.77569497, 0.45524533, 0.1668691 ])

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

>>> nctdtrinc(3, p, 1.5)
array([0.5, 1.5, 2.5])