Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Luis A. Afonso
Posts:
4,743
From:
LIsbon (Portugal)
Registered:
2/16/05


A not expected asymptotical test statistics
Posted:
Nov 20, 2012 12:08 PM


A not expected asymptotical test statistics
I feel I was rewarded, this time, by my curiosity to search for illconformations. Trying to illustrate a current test by numeric examples, I was able to show that an asymptotical characteristic was present, the textbooks omit, as far as I know.
For D we note the difference of homoscedastic Population normal means en.wikipedia.org/wiki/Homoscedasticity we are dealing with the Populations noted by X~N(muX, sigma):nX, Y~N(muX + D, sigma):nY. For example: _______ X ~ N(D, 1):20, Y ~ N(0, 1):20, D>=0. The test statistics T is such that the following interval contains D with 95% probability (xhatyhat)  2.02439* nw <= D <= <= (xhatyhat) + 2.02439* nw __ nw= sqrt ( (ssdX+ssdY) * (1/nX+1/nY)/(nX+nY2)) With ssdX = sum squares differences; sample X, size 20, which mean is xhat. (Similarly for sample Y); nX=nY=20.
__________________________
_Results (program PW)
_______n=6 ____2.228___(10df) ______ D= 0____Power= 100 % _________ 2__________ 98.8 _________ 4__________ 97.3 __________6__________ 96.7
_______n=14 ____2.056___(26df) ______ D= 0____Power= 97.4% _________ 2__________ 97.2 _________ 4__________ 97.7 _________10__________ 98.4
_______n=20____2.02439___(38df) ______ D= 0____Power= 96.7 % _________ 2__________ 96.7 _________ 4__________ 97.0 __________6__________ 97.5
_______n=50____1.98447___(98df) ______ D= 0____Power= 95.6% _________ 2__________ 95.9 _________ 4__________ 96.8 _________ 6__________ 97.7
_______n=100____1.97202__(198df) ______ D= 0____Power= 95.4% __________2__________ 95.6 __________4__________ 96.5 __________6__________ 97.7
The expectation is that D=0 provide a 95% Power, which grows to 100% with increasing D, the Population X mean value differs from 0. It?s really what I?d found. However it?s odd that the interval between bounds for very small sizes, 6x6, contains, wrongly, as much as 100% sample T´s, when exactly 95% was expected by construction: two tails test, 5% confidence level. The only explanation is that the tests statistics frequencies that are outside the *acceptance* interval only asymptotically (i.e. for large sample sizes) tends to Student distribution probability 1alpha/2.
Luis A. Afonso
REM "PW" CLS PRINT PRINT "______________PW__________________" DEFDBL AZ PRINT " POWER (95% CI) for D>=0 "; PRINT " X~N(D,1):n, Y~N(0,1):n "; PRINT " 6+ 6=T0=2.228___14+14=2.056__20+20=2.02439" PRINT " 30+30=2.00172__40+40=1.99085__50+50=1.98447" PRINT " 60+60=1.98027__70+70=1.97730__80+80=1.97509" PRINT " 90+90=1.97338__100+100=1.97202 " INPUT " nX=nY , T0 "; n, T0 INPUT " how many "; many nw = (1 / n + 1 / n) / (n + n  2) pi = 4 * ATN(1) FOR ti = 0 TO 20 STEP 2 D = ti RANDOMIZE TIMER FOR i = 1 TO many LOCATE 10, 30 PRINT USING "#########"; many  i PRINT " D POWER% T > " sx = 0: sy = 0: ssx = 0: ssy = 0 REM FOR t = 1 TO n 1 a = RND IF a < 1E15 THEN GOTO 1 a = SQR(2 * LOG(a)) x = D + 10 * a * COS(2 * pi * RND) sx = sx + x ssx = ssx + x * x y = 0 + a * SIN(2 * pi * RND) sy = sy + y ssy = ssy + y * y NEXT t mx = sx / n sdx = ssx  n * mx * mx my = sy / n sdy = ssy  n * my * my u = T0 * SQR((ssx + ssy) * nw) u0 = (mx  my)  u: u1 = (mx  my) + u COLOR 7 IF u0 < D AND u1 > D THEN GOTO 40 rj = rj + 1 40 NEXT i w = w + 1 LOCATE 10 + w, 30 PRINT USING "##"; D; PRINT USING " ###.# #.### "; 100 * (1  rj / i); T0 rj = 0 NEXT ti END



