Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » sci.math.* » sci.stat.math.independent

Topic: The Central 5% Confidence Interval for .Lilliefors . .
Replies: 1   Last Post: Oct 31, 2012 10:23 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Luis A. Afonso

Posts: 4,518
From: LIsbon (Portugal)
Registered: 2/16/05
The Central 5% Confidence Interval for .Lilliefors . .
Posted: Oct 30, 2012 9:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The Central 5% Confidence Interval the Kolmogorov-Smirnov-Lilliefors D test statistics for Normal Data
_________________________

The following empirical rule holds from normal sample sizes 30 to 500 in what concerns the ?central? 95% CI for D:
__left = INT(0.14*n + 0.5), right = INT(0.86*n +0.5)

_n= 30 [ 4, 26]
_n= 35 [ 5, 30]___40 [ 6, 34]___45 [ 6, 39]
_n= 50 [ 7, 42]___75 [ 11, 65]__100 [14, 86]
_n=150 [ 21, 129]___200 [ 28, 172]__250 [35, 215]
_n=300 [ 42, 258]__ 400 [ 56, 344]__500 [70, 430]
____________________________________

Program ?DLOC?,
1´000´000 till n=75

__n=_20___2(0.012), 3(0.033)__17(0.966), 18(0.988)__
__n=_25___3(0.020), 4(0.040)__21(0.959), 22(0.980)__
__n= 30___3(0.012), 4(0.026)__26(0.974), 27(0.987)__
__n= 35___4(0.017), 5(0.030)__30(0.969), 31(0.982)__
__n= 40___5(0.021), 6(0.034)__34(0.965), 35(0.978)__
__n= 45___5(0.016), 6(0.025)__39(0.975), 40(0.984)__
__n= 50___6(0.019), 7(0.029)__43(0.971), 44(0.981)__
__n= 75__10(0.025),11(0.032)_ 64(0.969), 65(0.975)__

800´000 from n=100 to 250

_n= 100__13(0.022),14(0.027)__86(0.972), 87(0.977)__
_n= 150__20(0.023),21(0.026)_129(0.973).130(0.977)__
_n= 200__27(0.023),28(0.026)_172(0.974),173(0.976)__
_n= 250__34(0.024),35(0.026)_215(0.974),216(0.976)__

80´000 from n=300 to 500

_n=300__42(0.025), 43(0.026)__258(0.975), 259(0.976)
_n=400__55(0.024), 56(0.026)__344(0.945), 345(0.976)
_n=500__69(0.024), 70(0.025)__430(0.974), 431(0.976)


The D locations are symmetric about the data centre, after ordered.
D = max [ | Phi Z(i) - (i-1)/n | , | i/n - Phi Z(i) | ], summation for i=1 to n.

Luis A. Afonso


REM "DLOC"
CLS
PRINT " ***** DLOC: where are situated the";
PRINT " Kolmogorov Smirnov D *****"
INPUT " n= "; n
INPUT " all= "; ali
DIM ponto(n)
pi = 4 * ATN(1): c = 1 / SQR(2 * pi)
DIM x(n), xx(n), F(n)
DIM w(9004)
DEF fng (z, j) = -.5 * z ^ 2 * (2 * j + 1) / ((j + 1) * (2 * j + 3))
F(0) = 0
FOR i = 1 TO n: F(i) = i / n: NEXT i
FOR k = 1 TO ali: RANDOMIZE TIMER
mmaior = -1E+20
LOCATE 3, 50: PRINT USING "########"; ali - k
md = 0: soma2 = 0
pass = ali / 4
ki = INT(k / pass)
FOR i = 1 TO n
123 a = RND
IF a < 1E-10 THEN GOTO 123
a = SQR(-2 * LOG(a))
x(i) = a * COS(2 * pi * RND)
md = md + x(i) / n
soma2 = soma2 + x(i) * x(i)
NEXT i
sqd = soma2 - n * (md ^ 2): sd = SQR(sqd / (n - 1))
FOR i7 = 1 TO n
x(i7) = (x(i7) - md) / sd
NEXT i7
FOR i5 = 1 TO n: u = x(i5): w = 1
FOR jj = 1 TO n
IF x(jj) < u THEN w = w + 1
NEXT jj: xx(w) = u
NEXT i5
REM "********************"
FOR tt = 1 TO n: z = xx(tt)
REM Fi(z) calcul
IF z > 0 THEN kw = 0
IF z <= 0 THEN kw = 1
zu = ABS(z): s = c * zu: ante = c * zu
FOR j = 0 TO 10000
xx = ante * fng(zu, j)
s = s + xx
ante = xx
IF ABS(xx) < .00005 THEN GOTO 20
NEXT j
20 IF kw = 0 THEN FF = .5 + s
IF kw = 1 THEN FF = .5 - s
b = ABS(FF - F(tt - 1))
bb = ABS(F(tt) - FF)
maior = b
IF bb > b THEN maior = bb
IF maior > mmaior THEN GOTO 90
GOTO 99
90 mmaior = maior: py = tt
99 NEXT tt
ponto(py) = ponto(py) + 1 / ali
mm = INT(1000 * mmaior + .5)
IF mm > 9000 THEN mm = 9000
w(mm) = w(mm) + 1
IF INT(k / pass) <> k / pass THEN GOTO 111
cc(1) = .8: cc(2) = .85: cc(3) = .9
cc(4) = .95: cc(5) = .99
LOCATE 6, 10 * ki + 1
FOR t2 = 1 TO 5
si = 0
FOR iij = 0 TO 9000
si = si + w(iij) / k
IF si > cc(t2) THEN GOTO 100
NEXT iij
100 LOCATE 5 + t2, 10 * ki + 1
PRINT USING "##.### ##.#### "; iij / 1000; si
NEXT t2
111 NEXT k: PRINT
CUMM = 0: COLOR 10
FOR ki = 1 TO n
CUMM = CUMM + ponto(ki)
IF CUMM > .15 AND CUMM < .94 THEN GOTO 22
IF CUMM <= .025 OR CUMM >= .975 THEN COLOR 14
PRINT USING "### #.### "; ki; CUMM;
COLOR 10
22 NEXT ki
COLOR 7
END



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.