<s>
In	O
statistics	O
,	O
the	O
Jarque	B-General_Concept
–	I-General_Concept
Bera	I-General_Concept
test	I-General_Concept
is	O
a	O
goodness-of-fit	O
test	O
of	O
whether	O
sample	O
data	O
have	O
the	O
skewness	B-General_Concept
and	O
kurtosis	B-Error_Name
matching	O
a	O
normal	O
distribution	O
.	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
always	O
nonnegative	O
.	O
</s>
<s>
where	O
n	O
is	O
the	O
number	O
of	O
observations	O
(	O
or	O
degrees	O
of	O
freedom	O
in	O
general	O
)	O
;	O
S	O
is	O
the	O
sample	O
skewness	B-General_Concept
,	O
K	O
is	O
the	O
sample	O
kurtosis	B-Error_Name
:	O
</s>
<s>
is	O
the	O
estimate	O
of	O
the	O
second	O
central	B-General_Concept
moment	I-General_Concept
,	O
the	O
variance	O
.	O
</s>
<s>
The	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
a	O
joint	O
hypothesis	O
of	O
the	O
skewness	B-General_Concept
being	O
zero	O
and	O
the	O
excess	O
kurtosis	B-Error_Name
being	O
zero	O
.	O
</s>
<s>
Samples	O
from	O
a	O
normal	O
distribution	O
have	O
an	O
expected	O
skewness	B-General_Concept
of	O
0	O
and	O
an	O
expected	O
excess	O
kurtosis	B-Error_Name
of	O
0	O
(	O
which	O
is	O
the	O
same	O
as	O
a	O
kurtosis	B-Error_Name
of	O
3	O
)	O
.	O
</s>
<s>
For	O
small	O
samples	O
the	O
chi-squared	O
approximation	O
is	O
overly	O
sensitive	O
,	O
often	O
rejecting	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
when	O
it	O
is	O
true	O
.	O
</s>
<s>
Furthermore	O
,	O
the	O
distribution	O
of	O
p-values	B-General_Concept
departs	O
from	O
a	O
uniform	O
distribution	O
and	O
becomes	O
a	O
right-skewed	B-General_Concept
unimodal	O
distribution	O
,	O
especially	O
for	O
small	O
p-values	B-General_Concept
.	O
</s>
<s>
The	O
table	O
below	O
shows	O
some	O
p-values	B-General_Concept
approximated	O
by	O
a	O
chi-squared	O
distribution	O
that	O
differ	O
from	O
their	O
true	O
alpha	O
levels	O
for	O
small	O
samples	O
.	O
</s>
<s>
In	O
MATLAB	B-Language
's	O
implementation	O
,	O
the	O
chi-squared	O
approximation	O
for	O
the	O
JB	O
statistic	O
's	O
distribution	O
is	O
only	O
used	O
for	O
large	O
sample	O
sizes	O
(	O
>2000	O
)	O
.	O
</s>
<s>
For	O
smaller	O
samples	O
,	O
it	O
uses	O
a	O
table	O
derived	O
from	O
Monte	B-Algorithm
Carlo	I-Algorithm
simulations	I-Algorithm
in	O
order	O
to	O
interpolate	O
p-values	B-General_Concept
.	O
</s>
<s>
includes	O
an	O
implementation	O
of	O
the	O
Jarque	B-General_Concept
–	I-General_Concept
Bera	I-General_Concept
test	I-General_Concept
in	O
C++	O
,	O
C#	O
,	O
Delphi	O
,	O
Visual	O
Basic	O
,	O
etc	O
.	O
</s>
<s>
Julia	B-Application
includes	O
an	O
implementation	O
of	O
the	O
Jarque-Bera	B-General_Concept
test	I-General_Concept
JarqueBeraTest	O
in	O
the	O
HypothesisTests	O
package	O
.	O
</s>
<s>
MATLAB	B-Language
includes	O
an	O
implementation	O
of	O
the	O
Jarque	B-General_Concept
–	I-General_Concept
Bera	I-General_Concept
test	I-General_Concept
,	O
the	O
function	O
"	O
jbtest	O
"	O
.	O
</s>
<s>
Python	B-Language
statsmodels	B-Application
includes	O
an	O
implementation	O
of	O
the	O
Jarque	B-General_Concept
–	I-General_Concept
Bera	I-General_Concept
test	I-General_Concept
,	O
"	O
statsmodels.stats.stattools.py	O
 "	O
.	O
</s>
<s>
R	B-Language
includes	O
implementations	O
of	O
the	O
Jarque	B-General_Concept
–	I-General_Concept
Bera	I-General_Concept
test	I-General_Concept
:	O
jarque.bera.test	O
in	O
the	O
package	O
tseries	O
,	O
for	O
example	O
,	O
and	O
jarque.test	O
in	O
the	O
package	O
moments	O
.	O
</s>
<s>
Wolfram	B-Application
includes	O
a	O
built	O
in	O
function	O
called	O
,	O
JarqueBeraALMTest	O
and	O
is	O
not	O
limited	O
to	O
testing	O
against	O
a	O
Gaussian	O
distribution	O
.	O
</s>
