Python statsmodels.jarque |
您所在的位置:网站首页 › jarquebera检验原假设 › Python statsmodels.jarque |
借助statsmodels.jarque_bera()方法,我们可以得到jarque bera检验的正态性,它是基于偏度和峰度的检验,并且具有渐近分布。 用法: statsmodels.jarque_bera(residual, axis) 返回:Return the jarque bera test statistics, pvalue, skewness, and the kurtosis.范例1:在这个例子中,我们可以通过使用statsmodels.jarque_bera()方法,我们可以使用此方法获取jarque bera测试统计信息,pvalue,偏度和峰度。 # import numpy and statsmodels import numpy as np from statsmodels.stats.stattools import jarque_bera g = np.array([1, 2, 3]) # Using statsmodels.jarque_bera() method gfg = jarque_bera(g) print(gfg)输出: (0.28125, 0.8688150562628432, 0.0, 1.5) 范例2: # import numpy and statsmodels import numpy as np from statsmodels.stats.stattools import jarque_bera g = np.array([1, 2, 3, -1, -2, -3]) # Using statsmodels.jarque_bera() method gfg = jarque_bera(g) print(gfg)输出: (0.5625000000000003, 0.7548396019890072, 0.0, 1.4999999999999996)
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |