Lesson 13 of 15
Jarque-Bera Test
Jarque-Bera Test
The Jarque-Bera (JB) test checks whether a sample comes from a normal distribution by examining skewness and excess kurtosis. A normal distribution has skewness = 0 and excess kurtosis = 0.
The JB statistic is:
where:
- is the sample size
- is the sample skewness:
- is the excess kurtosis:
- is the population standard deviation (divide by )
Under the null hypothesis of normality, follows a chi-squared distribution with 2 degrees of freedom. Large values reject normality.
Symmetric data () and mesokurtic data () yield small JB. Skewed or heavy-tailed data yield large JB.
Your Task
Implement jarque_bera(xs) returning the JB statistic.
Python runtime loading...
Loading...
Click "Run" to execute your code.