stats.stattools.jarque_bera()

statsmodels.stats.stattools.jarque_bera

statsmodels.stats.stattools.jarque_bera(resids, axis=0) [source]

Calculates the Jarque-Bera test for normality

Parameters:

data : array-like

Data to test for normality

axis : int, optional

Axis to use if data has more than 1 dimension. Default is 0

Returns:

JB : float or array

The Jarque-Bera test statistic

JBpv : float or array

The pvalue of the test statistic

skew : float or array

Estimated skewness of the data

kurtosis : float or array

Estimated kurtosis of the data

Notes

Each output returned has 1 dimension fewer than data

The Jarque-Bera test statistic tests the null that the data is normally distributed against an alternative that the data follow some other distribution. The test statistic is based on two moments of the data, the skewness, and the kurtosis, and has an asymptotic \chi^2_2 distribution.

The test statistic is defined

JB = n(S^2/6+(K-3)^2/24)

where n is the number of data points, S is the sample skewness, and K is the sample kurtosis of the data.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.stattools.jarque_bera.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部