|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.test.HypothesisTest
com.numericalmethod.suanshu.stats.test.distribution.normality.JarqueBera
public class JarqueBera
The Jarque–Bera test is a goodness-of-fit measure of departure from normality, based on the sample kurtosis and skewness.
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.
| Field Summary | |
|---|---|
int |
nSim
|
| Fields inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest |
|---|
k, N, pValue, testStatistics |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
java.lang.String |
alternativeHypothesis()
Get a description of the alternative hypothesis. |
java.lang.String |
nullHypothesis()
Get a description of the null hypothesis. |
| Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest |
|---|
oneSidedPvalue, pValue, rejectNull, testStatistics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int nSim
| Constructor Detail |
|---|
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 sample| Method Detail |
|---|
public java.lang.String nullHypothesis()
HypothesisTest
nullHypothesis in class HypothesisTestpublic java.lang.String alternativeHypothesis()
HypothesisTest
alternativeHypothesis in class HypothesisTest
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||