Re: Bob Ling´s ignorance is clear
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 11:50:26 EST
Let be the GENERAL problem of comparing two INDEPENDENT Binomial distributions X ~ Bin (p(X), n1), Y ~ Bin (p(Y), n2), when it was observed x *good* items from the X Distribution in1 trials and y from Y in n2 trials.
The Null Hipotheses , H0 , is
_________________H0: |p(X)-p(Y)| <= w
and______________H1: |p(X)-p(Y)| > w
where w is a GIVEN quantity.
(in words : we intend to check if the absolute difference between the parameters values are at most w).
The method:
We evaluate the probability of all pairs x, y obeying to H0 or 1-ALPHA. Therefore if ALPHA is
____________higher or equal to the pretended Significance Level H0 MUST BE RETAINED; otherwise there is sufficient evidence to reject it.
The probability
___p(not accepting Ho | Ho is true) = alpha
___= p(to commit a Type I error)
The Exact method is characterized in that ALPHA is directly obtained, being the respective CRITICAL VALUE unknown. This fact is understandable for RATIONAL PEOPLE (excluding Bob Ling and his GANG obviously).
Example: (program
____x = 17 , n1= 20 ( pX = x / n1 = 0.85 )
____y = 7, n2 = 20 ( pY = y / n2 = 0.35 )
____w = 0.17
the probability of the two tails (left and right) is ALPHA = 0.00959 and we must not reject H0 at the at 95 and at 99% Confidence Levels.
What is interesting (not boring as Robert (Bob) Ling´s DOCTORALY and BURRICALY claimed) is that the CLASSIC Z test gives the CONFIDENCE INTERVALS for w :
_____at 95% Confidence Level [ 0.2389 , 0.7611 ]
_____at 99% [ 0.1568 , 0.8432 ]
Z = 2.4769 therefore lower than
Z [(1- alpha) = 0.99) ] = 2.576 WHICH *** ERROUSLY *** DOES NOT REJECTS THE NULL HYPOTHESES AT THE 99% Confidence Level.
This is an SERIOUS WARNING against the use of the Z test in this instance. IT MUST BE SUBSTITUTED UNMISTABLY by the exact method which, based on the FIRST PRINCIPLES, could not provide wrong results.
ONLY MAD MEN ARE UNCOMFORTABLE WITH REALITY
_______licas (Luis A. Afonso)
REM "FOR22"
1 CLS : PRINT "FOR22 ******";
PRINT " d1=x/n1 , d2=y/n2 ---> |p(X)-p(Y)| <= W "
PRINT " ** ** ** ** ** ** ** ** ** ** ** ";
PRINT "** ** ** ** ** ** ** ** ** ** ** "
DEFDBL A-Z
INPUT " X "; x
INPUT " Y "; y
INPUT " nX "; n1: p1 = x / n1
INPUT " nY "; n2: p2 = y / n2
PRINT " pX , pY DELTA = ";
PRINT USING "#.#### "; p1; p2; ABS(p1 - p2)
INPUT " w "; w
PRINT " ** ** ** ** ** ** ** ** ** ** ** ";
PRINT "** ** ** ** ** ** ** ** ** ** ** "
DIM px(n1), py(n2)
px(0) = (1 - p1) ^ n1
FOR j = 0 TO n1 - 1
px(j + 1) = px(j) * (n1 - j) / (j + 1) * p1 / (1 - p1)
NEXT j
py(0) = (1 - p2) ^ n2
FOR j = 0 TO n2 - 1
py(j + 1) = py(j) * (n2 - j) / (j + 1) * p2 / (1 - p2)
NEXT j
REM
LOCATE 10, 1
pp = 0: FOR yy = 0 TO n2
FOR xx = 0 TO n1
d = ABS(xx / n1 - yy / n2)
IF d > w THEN GOTO 22
pp = pp + px(xx) * py(yy)
22 NEXT xx: NEXT yy: LOCATE 8, 50
PRINT USING " 2tails = #.##### "; pp
REM current method
LOCATE 10, 20
cv(1) = 1.959964: cv(2) = 2.575829
cl$(1) = "95CL=": cl$(2) = "99CL="
d = ABS(p1 - p2)
s = p1 * (1 - p1) / n1 + p2 * (1 - p2) / n2
s = SQR(s): z = (d - w) / s
LOCATE 10, 19
PRINT USING " Z value=###.######"; z
FOR kk = 1 TO 2
c2 = d + s * cv(kk): c1 = d - s * cv(kk)
PRINT cl$(kk); : PRINT " for W -----> ";
PRINT USING " ###.#### "; c1; c2
NEXT kk
END
.
- Prev by Date: Exact Level of Significance
- Next by Date: Re: Ask for help on sample size decision for a non-normal distribution
- Previous by thread: Exact Level of Significance
- Next by thread: Re: Bob Ling´s ignorance is clear
- Index(es):
Relevant Pages
|