scipy.special.stdtridf#
- scipy.special.stdtridf(p, t, out=None) = <ufunc 'stdtridf'>#
与自由度 df 相关的
stdtr的反函数返回 df 的值,使得 stdtr(df, t) 等于 p。
- 参数:
- parray_like
概率
- tarray_like
积分上限
- outndarray, optional
用于存储函数结果的可选输出数组
- 返回:
- df标量或 ndarray
使得
stdtr(df, t) == p的 df 值
另请参阅
stdtr学生 t CDF
stdtrit相对于 t 的 stdtr 反函数
scipy.stats.t学生 t 分布
示例
计算一组参数的学生 t 累积分布函数。
>>> from scipy.special import stdtr, stdtridf >>> df, x = 5, 2 >>> cdf_value = stdtr(df, x) >>> cdf_value 0.9490302605850709
验证
stdtridf是否能针对给定的 CDF 值和 x 恢复原始的 df 值。>>> stdtridf(cdf_value, x) 5.0