Re: What is BIAS
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 10:15:23 EST
Yet in the case of the functional relationship between the X and Y r.v.
______W = (X *Y ) / (X+Y)
I performed a set of simulation experiments to find what happens when Bootstrap is chosen as a Method to evaluate the W true value.
I performed 500 times the following:
a) Two independent similar normal
R1, R2 = N (100, sigma): *lot*
samples were simulated by an exact method.
From the mean of the “lot” we have the respective W value: *msource*. These Source Samples are the raw material to the Bootstrap pseudo-samples. Each one of the two “vectors” provide the variables separately; putting in the formula gives a generic W. The overall mean gives the final Bootstrap value, *B*.c) Because both Populations R1 and R2 have mean=100, the exact value that we want to attain is, of course, W=50.
d) Both *msource* and *B* are not exactly 50 they have Bias, that ignoring signals, are respectively *BIASb* and. *BIASSOURCE* by rather different raisons (see below). Note that all starred quantities can be found in the program listing.
From where bias come?a) from *msource* because of randomness,
b) from * B * because the obvious raison that Bootstrap pseudo-samples are not equally representative of the Populations due the number of repeated values they contain.
c) Every time the ratio above is less than 1 it can be said that Bootstrap is less distant to 50 than that that of the current method. Otherwise Bootstrap spoils it and is at least worthless.
***********
Values showing the frequency (500 sources) that Bootstrap IMPROVES.
_lot=10, Boots/source=1000, data N(100, 1)
____________0.448
_lot=10, Boots/source=2000, data N(100, 1)
____________0.452
_lot=20, Boots/source=4000, data N(100, 1)
____________0.472
_lot=20, Boots/source=1000, data N(100, 10)
____________0.506
_lot=30, Boots/source=1000, data N(100, 20)
____________0.452
Impressive isn´it?
Following a private e-mail:
***Dear Mr. Kochanski : Allow me to express how touching is for me your faith in the Bootstrap utility used in complicated cases, when it fails miserably in the simpler ones. I am not a BELIEVER, unfortunately:. I have the *vice* to check…***
________licas (Luis A. Afonso)
REM "GOBACK"
CLS
pi = 4 * ATN(1)
PRINT " R1 , R2 "
INPUT " How many pairs (source) "; lot
INPUT
" How many BOOTSTRAPS / source "; boots
DIM R1(lot), R2(lot)
INPUT " R1, R2 --> N(100, sigma) "; s
PRINT " 500 sources ":
NSOURCES = 500
FOR SC = 1 TO NSOURCES
LOCATE 7, 50:
PRINT USING "###########";
NSOURCES - SC
LOCATE 8, 50:
PRINT USING "#.#### "; OK / SC
RANDOMIZE TIMER
msource = 0
FOR j = 1 TO lot
a = SQR(-2 * LOG(RND)): u = RND
R1(j) = 100 + s * a * COS(2 * pi * u)
R2(j) = 100 + s * a * SIN(2 * pi * u)
eq = (R1(j) * R2(j)) / (R1(j) + R2(j))
msource = msource + eq / lot
NEXT j:
BIASSOURCE = ABS(msource - 50)
REM BOOTSTRAPPING sc
B = 0
FOR i = 1 TO boots
RANDOMIZE TIMER
FOR n = 1 TO lot
g1 = INT(lot * RND) + 1
g2 = INT(lot * RND) + 1
x = R1(g1): y = R2(g2)
k = (x * y) / (x + y)
B = B + k / lot
NEXT n
NEXT i
B = B / boots: BIASb = ABS(B - 50)
INDEX = BIASb / BIASSOURCE
IF INDEX < 1 THEN OK = OK + 1
NEXT SC
END
.
- References:
- What is BIAS
- From: \"Luis A. Afonso\"
- What is BIAS
- Prev by Date: Re: multicollinearity in regression
- Next by Date: Re: multicollinearity in regression
- Previous by thread: Re: What is BIAS
- Next by thread: Re: What is BIAS
- Index(es):