[英]Why is Jarque-Bera Test right value only returning 0?
The jarque_bera
test is testing the null hypothesis that your values are distributed with the same skewness and kurtosis of the normal distribution. jarque_bera
测试正在测试零假设,即您的值以与正态分布相同的偏度和峰度分布。
What's happening is that for each test, your test statistic is sufficiently large that the p-values are exceedingly small so python just displays 0. Scipy uses the cdf
to calculate the p-value which only gets down to e-16
.发生的情况是,对于每个测试,您的测试统计量足够大,以至于 p 值非常小,因此 python 仅显示 0。Scipy 使用
cdf
计算 p 值,该值仅下降到e-16
。 Using the sf
can give you decimals until it underflows.使用
sf
可以给你小数,直到它下溢。
from scipy import stats
stats.chi2.cdf(1154.1959249402914, 2)
#1.0
# scipy reported p-value
1 - stats.chi2.cdf(1154.1959249402914, 2)
#0.0
# This function gives us decimals
stats.chi2.sf(1154.1959249402914, 2)
#2.3417438136962163e-251
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.