Calculates the Jarque-Bera test for normality
Parameters: | data : array-like
axis : int, optional
|
---|---|
Returns: | JB : float or array
JBpv : float or array
skew : float or array
kurtosis : float or array
|
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.