public class JarqueBera extends HypothesisTest
The statistic JB has an asymptotic chi-square distribution with two degrees of freedom and can be used to test the null hypothesis that the data are from a normal distribution. The null hypothesis is a joint hypothesis of the skewness being zero and the excess kurtosis being 0, since samples from a normal distribution have an expected skewness of 0 and an expected excess kurtosis of 0 (which is the same as a kurtosis of 3). As the definition of JB shows, any deviation from this increases the JB statistic.
The R equivalent function is rjb.test in package lawstat, or jarque.bera.test in package tseries for N > 2000.
| Modifier and Type | Field and Description |
|---|---|
int |
nSim |
k, N, pValue, testStatistics| Constructor and Description |
|---|
JarqueBera(double[] sample)
Perform the Jarque-Bera test to test for the departure from normality,
using the asymptotic chi-square distribution.
|
JarqueBera(double[] sample,
boolean isExact)
Perform the Jarque-Bera test to test for the departure from normality.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlternativeHypothesis()
Get a description of the alternative hypothesis.
|
java.lang.String |
getNullHypothesis()
Get a description of the null hypothesis.
|
isNullRejected, oneSidedPvalue, pValue, statisticspublic final int nSim
public JarqueBera(double[] sample,
boolean isExact)
sample - a sampleisExact - indicate whether the exact Jarque-Bera distribution is to be usedpublic JarqueBera(double[] sample)
sample - a samplepublic java.lang.String getNullHypothesis()
HypothesisTestgetNullHypothesis in class HypothesisTestpublic java.lang.String getAlternativeHypothesis()
HypothesisTestgetAlternativeHypothesis in class HypothesisTest