scipy.special.nctdtrinc#
- scipy.special.nctdtrinc(df, p, t, out=None) = <ufunc 'nctdtrinc'>#
计算非中心 t 分布的非中心性参数。
更多详情请参见
nctdtr
。- 参数:
- df类数组
分布的自由度。应在 (0, inf) 范围内。
- p类数组
CDF 值,在 (0, 1] 范围内。
- t类数组
分位数,即积分上限。
- outndarray, 可选
用于函数结果的可选输出数组
- 返回:
- nc标量 或 ndarray
非中心性参数
示例
>>> from scipy.special import nctdtr, nctdtrinc
计算 nc 几个值的 CDF
>>> nc = [0.5, 1.5, 2.5] >>> p = nctdtr(3, nc, 1.5) >>> p array([0.77569497, 0.45524533, 0.1668691 ])
计算逆函数。我们得到了预期的 nc 值
>>> nctdtrinc(3, p, 1.5) array([0.5, 1.5, 2.5])