Re: Bob Ling´s ignorance is clear



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
.



Relevant Pages

  • Re: distribution of n point on the unit circle
    ... What is the probability density function or the distribution ... sector of the unit circle with that opening angle. ... alpha cannot be bigger than pi. ... if alpha> beta then the anticlockwise angle ...
    (sci.math)
  • Re: What does the p-value mean
    ... The probability of incorrectly rejecting is a long-run probability, over many repetitions of the test procedure on different data. ... "Given a fixed significance level alpha, chosen in advance, you can define a test procedure which has a probability of incorrectly rejecting a true null hypothesis only alpha%, by simply computing the p-value and rejecting the null if p<alpha. ... We then say that the result is statistically significant, because you have some strong evidence against the null. ...
    (comp.soft-sys.matlab)
  • Re: card game
    ... REM "lua" ... I believe that my Oct. 25, 26 posts are right to find out the probability to draw the first ace, without replacement, evidently. ... FOR rpt = 1 TO all ... RANDOMIZE TIMER ...
    (sci.stat.math)
  • Re: How to Compare the Two Non-Normal Datasets?
    ... significance level (say alpha). ... significance tests don't work that way. ... to reject you do not know what the probability of being wrong is. ...
    (sci.stat.math)
  • Re: Surfaces of hyperspheres
    ... Draw uniformly at random a point of norm 1 in Euclidean n-space. ... let's assume that alpha is in the open interval ... We want twice the probability that the x-coordinate> alpha. ... This is proportional to the n-volume of the ...
    (sci.math)