scipy.special.stdtridf#

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

stdtr 相對於 df 的反函數

返回參數 df,使得 stdtr(df, t) 等於 p

參數:
parray_like

機率

tarray_like

積分上限

outndarray,可選

函數結果的可選輸出陣列

返回:
df純量或 ndarray

df 的值,使得 stdtr(df, t) == p

參見

stdtr

學生 t CDF

stdtrit

stdtr 相對於 t 的反函數

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