Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Jarque-Bera test: checking quantiles
Replies: 0

 Luis A. Afonso Posts: 4,743 From: LIsbon (Portugal) Registered: 2/16/05
Jarque-Bera test: checking quantiles
Posted: Nov 17, 2012 5:30 PM

Checking based on
__Precise finite-sample quantiles of the Jarque-Bera adjusted Lagrange multiplier test_________
Wuertz, Diethelm, and Katzberger, Helmut
http://mpra.ub.uni-muenchen.de/19155/

Nov. 2012, program Sk-0

Results:

____N=10________0.9500___0.9900__/400´000__
____N=20________0.9484___0.9902__
____N=35________0.9511___0.9904__
____N=50________0.9500___0.9903__
____N=75________0.9500___0.9900__
____N=100_______0.9502___0.9903__
____N=150_______0.9505___0.9902__
____N=200_______0.9508___0.9904__
____N=300_______0.9503___0.9904__
____N=500_______0.9508___0.9504__

Luis A. Afonso

REM "Sk2"
CLS : PRINT : PRINT
PRINT "__________ SK-0 _____________________"
PRINT "____________________________________"
PRINT "
PRINT "Jarque-Bera Test , N(0,1): size "
RANDOMIZE TIMER
PI = 4 * ATN(1)
PRINT " Enter from 1 to 12 following the size "
PRINT " Size: 10,20,35,50,75,100,150,200,300,500,800,1000"
INPUT indd
INPUT " How many samples "; MANY
DIM X(1000)
REM
DIM n(12), C5(12), C1(12)
REM
DATA 10,2.5247,5.7029
DATA 20,3.7154,9.7182
DATA 35,4.5929,11.736
DATA 50,4.9757,12.392
DATA 75,5.2777,12.586
DATA 100,5.4300,12.491
DATA 150,5.5984,12.185
DATA 200,5.6758,11.882
DATA 300,5.7732,11.358
DATA 500,5.8551,10.778
DATA 800,5.9103,10.299
DATA 1000,5.9242,10.117
REM
FOR i = 1 TO 12
NEXT i
C5 = C5(indd)
C1 = C1(indd)
n = n(indd)
PRINT " size= "; n
REM
FOR RPT = 1 TO MANY
LOCATE 12, 50: PRINT USING "########"; MANY - RPT
m1 = 0: m2 = 0: m3 = 0: m4 = 0
FOR i = 1 TO n
1 aa = RND
IF aa < .0000005 THEN GOTO 1
aa = SQR(-2 * LOG(aa))
X(i) = 0 + 1 * aa * COS(2 * PI * RND)
m1 = m1 + X(i) / n
NEXT i
m2 = 0: m3 = 0: m4 = 0
FOR i = 1 TO n: d = X(i) - m1
m2 = m2 + d * d / n
m3 = m3 + d * d * d / n
m4 = m4 + d * d * d * d / n
NEXT i
S0 = m3 / ((m2 ^ 1.5))
K0 = m4 / (m2 * m2) - 3
U = S0 * S0 * n / 6
V = K0 * K0 * n / 24
JB = U + V
IF JB <= C5 THEN GOTO 14
GOTO 15
14 accpt(1) = accpt(1) + 1
15 IF JB <= C1 THEN GOTO 16
GOTO 17
16 accpt(2) = accpt(2) + 1
17 REM
NEXT RPT: LOCATE 12, 45
PRINT USING "#.#### "; accpt(1) / MANY; accpt(2) / MANY
END