Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: A Newman-Pearson test. Jarque-Bera statistics: Normal or Uniform?
Replies: 2   Last Post: Apr 12, 2013 8:43 AM

 Messages: [ Previous | Next ]
 Luis A. Afonso Posts: 4,758 From: LIsbon (Portugal) Registered: 2/16/05
A Newman-Pearson test. Jarque-Bera statistics: Normal or Uniform?
Posted: Apr 11, 2013 7:59 PM

A Newman-Pearson test. Jarque-Bera statistics: Normal or Uniform?

0- Preliminaries
Following some time ago my concern, from the simultaneous comparison of the Jarque-Bera statistics, and by the other hand the Skewness and Kurtosis indexes (after reduction and squared ) we get a 8-classes: [000], [001], [010],?,[111] the three indexes in order, denoting 0 if not rejecting, 1 if does. Every Statistical Distribution, even no normal, does show a particular frequency pattern revealing it, in practice obtained simulating a large number of iid samples.
0.1 Example
With normal samples, size 100, and ALM statistics, we was able to obtain from 400´000 samples the following pattern:
___________Normal Disytibution_______Uniform________
___________[000]____0.9154__________0.0263___
___________[001]____0.0145__________0.4262___
___________[010]____0.0201__________0.0001___
___________[011]____0.0000__________0.0000___
___________[100]____0.0010__________0.0006___
___________[101]____0.0189__________0.5456___
___________[110]____0.0143__________0.0007___
___________[111]____0.0158__________0.0005___

Which can be grouped into:

_____1st___ [000]_______________________
___________________0.9154__________0.0263___
_____2nd___[001], [010], [101], [110], [111]
___________________0.0836__________0.9731___
_____3rd___[011], [100]
___________________0.0010__________0.0006___

The critical values, 5% significance, were respectively 6.32, 3.89, 3.54 the former two, U and V, quite similar.

__1__Numeric example

Suppose we are dealing with the Newman-Pearson test like H0: normal (Gaussian) population, Ha: uniform.
Two 100-size independent random samples are drawn, then tested by Jarque-Bera´s (ALM) resulting that both are 1st . so [000]. The conclusion follows: very likely the uniform possibility is discarded because 0.0236^2= 6.9E-4 contrasting with 0.9154^2 > 4/5.

Bibliography
D. Wurtz, H.G. Katzberger, (Aug.2005), Precise finite-sample quantiles of the Jarque-Bera adjusted Lagrange multiplier test.

Luis A. Afonso

REM "ROSE"
CLS
COLOR 13: PRINT : PRINT " < ROSE > PRINT " U,V - Critical Values, ALM & NORMAL DATA"
DEFDBL A-Z
pi = 4 * ATN(1)
RANDOMIZE TIMER
COLOR 14
INPUT " Size (<=2000 ) "; n
INPUT " How many "; many
DIM X(n), U1(8001), V1(8001)
c1 = 6 * (n - 2) / ((n + 1) * (n + 3))
c2 = 3 * (n - 1) / (n + 1)
c3 = 24 * n * (n - 2) * (n - 3) / ((n + 1) ^ 2 * (n + 3) * (n + 5))
REM
COLOR 7
FOR j = 1 TO many
LOCATE 7, 50: PRINT USING "########"; many - j
m = 0
FOR i = 1 TO n
aa = SQR(-2 * LOG(RND))
X(i) = 0 + 1 * aa * COS(2 * pi * RND)
m = m + X(i) / n
NEXT i
REM
m2 = 0: m3 = 0: m4 = 0
FOR i2 = 1 TO n: d = X(i2) - m
m2 = m2 + d * d / n
m3 = m3 + d * d * d / n
m4 = m4 + d * d * d * d / n
NEXT i2
s = m3 / (m2 ^ 1.5): U = s * s / c1
kk = m4 / (m2 * m2) - c2: v = kk * kk / c3
COLOR 7
a = INT(100 * U + .5): b = INT(100 * v + .5)
IF a > 8000 THEN a = 8000
IF b > 8000 THEN b = 8000
U1(a) = U1(a) + 1: V1(b) = V1(b) + 1
REM
REM
NEXT j
REM
v(1) = .95: v(2) = .99
LOCATE 10, 5: PRINT " U "
FOR vi = 1 TO 2
sum = 0
FOR t = 0 TO 8000
sum = sum + U1(t) / j
IF sum > v(vi) THEN GOTO 4
NEXT t
4 LOCATE 10 + vi, 5
PRINT USING "##.## #.### #.### "; t / 100; sum
NEXT vi
REM
LOCATE 10, 40: PRINT " V "
FOR vi = 1 TO 2
sum = 0
FOR t = 0 TO 8000
sum = sum + V1(t) / j
IF sum > v(vi) THEN GOTO 5
NEXT t
5 LOCATE 10 + vi, 40
PRINT USING "##.## #.### #.### "; t / 100; sum
NEXT vi
REM
END

REM "PURPOSE"
CLS
COLOR 13: PRINT : PRINT " < PURPOSE > "
PRINT " [JB, U, V ] ALM , normal "
DEFDBL A-Z
pi = 4 * ATN(1)
RANDOMIZE TIMER
COLOR 14
INPUT " Size (<=2000 ) "; n
INPUT " JBcrit, Ucrit, Vcrit "; JBcrit, Ucrit, Vcrit
INPUT " How many "; many
DIM x(n), U1(8001), V1(8001)
c1 = 6 * (n - 2) / ((n + 1) * (n + 3))
c2 = 3 * (n - 1) / (n + 1)
c3 = 24 * n * (n - 2) * (n - 3) / ((n + 1) ^ 2 * (n + 3) * (n + 5))
REM
COLOR 7
FOR j = 1 TO many
LOCATE 7, 50: PRINT USING "########"; many - j
m = 0
FOR i = 1 TO n
aa = SQR(-2 * LOG(RND))
x(i) = 0 + 1 * aa * COS(2 * pi * RND)
m = m + x(i) / n
NEXT i
REM
m2 = 0: m3 = 0: m4 = 0
FOR I2 = 1 TO n: d = x(I2) - m
m2 = m2 + d * d / n
m3 = m3 + d * d * d / n
m4 = m4 + d * d * d * d / n
NEXT I2
s = m3 / (m2 ^ 1.5): U = s * s / c1
kk = m4 / (m2 * m2) - c2: V = kk * kk / c3
COLOR 7
JB = U + V
REM
I1 = 0
IF JB > JBcrit THEN I1 = 1
I2 = 0
IF U > Ucrit THEN I2 = 1
I3 = 0
IF V > Vcrit THEN I3 = 1
REM
W(I1, I2, I3) = W(I1, I2, I3) + 1
REM
NEXT j
PRINT : PRINT : PRINT
FOR xw = 0 TO 1
FOR yw = 0 TO 1
FOR zw = 0 TO 1
PRINT " ";
PRINT USING "[# # #] "; xw; yw; zw;
PRINT USING "#.####"; W(xw, yw, zw) / many
NEXT zw
NEXT yw
NEXT xw
END

REM "U-ppose"
CLS
COLOR 13: PRINT : PRINT " < U-PPOSE > "
PRINT " [JB, U, V ] ALM , normal "
DEFDBL A-Z
REM
RANDOMIZE TIMER
COLOR 14
INPUT " Size (<=2000 ) "; n
INPUT " JBcrit, Ucrit, Vcrit "; JBcrit, Ucrit, Vcrit
INPUT " How many "; many
DIM x(n), U1(8001), V1(8001)
c1 = 6 * (n - 2) / ((n + 1) * (n + 3))
c2 = 3 * (n - 1) / (n + 1)
c3 = 24 * n * (n - 2) * (n - 3) / ((n + 1) ^ 2 * (n + 3) * (n + 5))
REM
COLOR 7
FOR j = 1 TO many
LOCATE 7, 50: PRINT USING "########"; many - j
m = 0
FOR i = 1 TO n
x(i) = RND
m = m + x(i) / n
NEXT i
REM
m2 = 0: m3 = 0: m4 = 0
FOR I2 = 1 TO n: d = x(I2) - m
m2 = m2 + d * d / n
m3 = m3 + d * d * d / n
m4 = m4 + d * d * d * d / n
NEXT I2
s = m3 / (m2 ^ 1.5): U = s * s / c1
kk = m4 / (m2 * m2) - c2: V = kk * kk / c3
COLOR 7
JB = U + V
REM
I1 = 0
IF JB > JBcrit THEN I1 = 1
I2 = 0
IF U > Ucrit THEN I2 = 1
I3 = 0
IF V > Vcrit THEN I3 = 1
REM
W(I1, I2, I3) = W(I1, I2, I3) + 1
REM
NEXT j
PRINT : PRINT : PRINT
FOR xw = 0 TO 1
FOR yw = 0 TO 1
FOR zw = 0 TO 1
PRINT " ";
PRINT USING "[# # #] "; xw; yw; zw;
PRINT USING "#.####"; W(xw, yw, zw) / many
NEXT zw
NEXT yw
NEXT xw
END

Date Subject Author
4/11/13 Luis A. Afonso
4/12/13 Luis A. Afonso
4/12/13 Luis A. Afonso