Re: CHI^2: 5% C.I. of the medians
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Fri, 24 Feb 2006 14:52:29 EST
5% confidence intervals of median/ mean (prgm SHERATIO)
___DF=10
___
__n=5___________[0.677; 1.198]
__n=7___________[0.709; 1.168]
__n=9___________[0.730; 1.144]
__n=11__________[0.750; 1.126]
__n=13__________[0.763; 1.113]
__n=15__________[0.772; 1.101]
__n=17__________[0.781; 1.092]
__n=19__________[0.787; 1.084]
__n=21__________[0.794; 1.078]
___DF=5
___
__n=5___________[0.525; 1.245]
__n=7___________[0.569; 1.206]
__n=9___________[0.595; 1.168]
__n=11__________[0.616; 1.146]
__n=13__________[0.634; 1.126]
__n=15__________[0.648; 1.108]
__n=17__________[0.658; 1.094]
__n=19__________[0.670; 1.083]
__n=21__________[0.680; 1.075]
________licas (Luís A. Afonso)
REM "SHERATIO"
CLS
DIM x(9001), o(2001)
PRINT "******** pgrm SHERATIO ******** "
PRINT " Chi-squared : 5% C.I. ":
PRINT " for MEDIAN/MEAN "
INPUT " df= "; df
INPUT " size="; size
DIM xb(size), xx(size)
all = 50000: pi = 4 * ATN(1)
FOR sample = 1 TO all
LOCATE 10, 10
PRINT USING "##############"; all - sample
FOR i = 1 TO size: she = 0
FOR ddf = 1 TO df
a = SQR(-2 * LOG(RND))
u = a * COS(2 * pi * RND)
she = she + u * u
NEXT ddf
xx(i) = she: xb(i) = she
NEXT i
FOR w = 1 TO size: min = 4E+07
FOR j = 1 TO size
IF xx(j) < min THEN GOTO 12
GOTO 20
12 min = xx(j): la = j
20 NEXT j: o(w) = min
xx(la) = 1E+10
NEXT w: mmd = INT(size / 2) + 1
median = o(mmd): mean = 0
FOR u = 1 TO size
mean = mean + xb(u) / size: NEXT u
xj = median / mean
xj = INT(1000 * xj + .5)
IF xj > 9000 THEN xj = 9000
x(xj) = x(xj) + 1
IF sample / 1000 <> INT(sample / 1000) THEN GOTO 33
RANDOMIZE TIMER
lmm(1) = .025 * sample: lmm(2) = .975 * sample
FOR g = 1 TO 2: s = 0
FOR i = 0 TO 9000
s = s + x(i)
IF s > lmm(g) THEN GOTO 4
NEXT i
4 PRINT USING "##.### #.### "; i / 1000; s / sample
NEXT g
33 NEXT sample
END
.
- References:
- CHI^2: 5% C.I. of the medians
- From: \"Luis A. Afonso\"
- CHI^2: 5% C.I. of the medians
- Prev by Date: Re: probability question
- Next by Date: Re: probability question
- Previous by thread: Re: CHI^2: 5% C.I. of the medians
- Next by thread: Statsoft - logic(al) formula
- Index(es):
Relevant Pages
|
|