R qchisq
函数将 p 值和自由度数转换为相应的卡方值。是否有具有等效项的 Python 库?
我在 SciPy 中四处寻找,没有找到任何东西。
最佳答案
它是 scipy.stats.chi2.ppf
- 百分比点函数(cdf 的倒数)。
例如,在 R 中:
> qchisq(0.05,5)
[1] 1.145476
在 Python 中:
In [8]: scipy.stats.chi2.ppf(0.05, 5)
Out[8]: 1.1454762260617695
关于python - 是否有与 R 的 qchisq 函数等效的 python?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18070299/