Re: Is DATA at random?
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 16:56:09 EST
Follows an example (Hogg , Tanis, Probability and Statistical Inference) that H0 cannot be accepted:
______ f = 1.00000
However the data is not rigorously in ascending order – only in <statistically >.
________licas (Luis A. Afonso)
REM "atrnd1"
CLS
RANDOMIZE TIMER
DIM x(20), xx(20)
minn = 1000: maxm = -1
DATA 56,55,58,56,57
DATA 54,56,57,54,55
DATA 57,59,54,55,56
DATA 57,54,58,58,58
FOR i = 1 TO 20: READ x(i)
IF x(i) > maxm THEN maxm = x(i)
IF x(i) < minn THEN minn = x(i)
pmt0 = pmt0 + i * x(i)
si = si + i: NEXT i
pmt0 = pmt0 / si
REM reduced data
pmt0 = 0
FOR j = 1 TO 20
x(j) = (x(j) - minn) / (maxm - minn)
xx(j) = x(j)
pmt0 = pmt0 + j * x(j)
NEXT j: pmt0 = pmt0 / si
PRINT USING " pmt0 = ###.### "; pmt0
all = 400000
FOR v = 1 TO all
RANDOMIZE TIMER
FOR t = 1 TO 20: xx(t) = x(t): NEXT t
pmt = 0
FOR h = 1 TO 20
10 h = INT(20 * RND) + 1
IF xx(h) = -1 THEN GOTO 10
pmt = pmt + h * x(h): xx(h) = -1
NEXT h
IF pmt / 20 > pmt0 THEN outt = outt + 1
IF pmt / 20 > pmt0 OR
pmt / 20 = pmt0 THEN out1 = out1 + 1
LOCATE 10, 10
PRINT USING "########### ##.#####";
all - v; outt / v
PRINT USING " ##.#####"; out1 / v
NEXT v : END
.
- References:
- Is DATA at random?
- From: \"Luis A. Afonso\"
- Is DATA at random?
- Prev by Date: probability concept
- Previous by thread: Is DATA at random?
- Next by thread: probability concept
- Index(es):