Re: When to use Fisher?



Tim Witort said:

I have always used Fisher when my sample size is less than
30, but I have also heard that, if certain counts in the
2x2 matrix cells are 5 or less, Fisher should also be used?
For example, with a matrix like this, should Fisher also be
used? The total sample is 38, but two cells have 5 or fewer
observations.

Outcome 1 Outcome 2

Group A 23 8

Group B 5 2

-- TRW

<<<<<<<<<<<<<<<<<<<<<<<<<

My response

1___The question here is a Test for Independence in a Contingence 2x2 Table. We have two samples drawn from two Populations and we will find if (or if not) the Populations are independent.
Sample A: a11 items * GOOD *, a12 * NOT GOOD *
Sample B: a21 items * GOOD *, a22 * NOT GOOD *
___________a11___a12____l1
___________a21___a22____l2
___________c1____c2_____n=l1+l2=c1+c2

__l1 and l2: total of each line, c1, c2 in columns.


___...the problem is to test the null Hypotheses, H0, that the two * treatments * are equally efficacious or not. (here treatment is ANY imposed or natural factor the samples are constrained.___
The efficacy is measured by the ratios r(A)=a11/(a11+a12) and r(B)=a21/(a21+a22).

These Tables have two possible processing : the Chi-Squared test for independence and the (exact) Test of Fisher-Irwin, (F.H.) depending on the number of items: the latter used even though they are very few. This test guarantees a specified control on of the type I error: to accept H0 if happens the Populations are not independent.


F.H. is based on the conditional probabilities of Tables in the case that the total of items in the lines and the total in the columns remains constant.
The conditional probabilities are given by
(aCb = a chose b)

_________p(A) = c1Ca11 * c2C12 /nCl1

________if we add 1 unit to a11 all the remaining cells will change resulting that p(A) will decrease.
___Successively adding 1 we will * rotten * A towards B which is, in short , going against H0, or by other words, summing these probabilities evaluating the tail´s size.

In particular reporting to the numeric example posted by Tim:

_______23_______8
________5_______2

gives p = 0.6077. This tail does not allow us to reject H0. Then the two groups are not different. (I love numbers; blah, blah, blah, not too much).

___a11___a12___a21___a22_______________________
___23____8______5_____2________1)__0.3604
___24____7______4_____3________2)__0.1947
___25____6______3_____4________3)__0.0545
___26____5______2_____5________4)__0.0075
___27____4______1_____6________5)__0.0005
___28____3______0_____7________6)__0.0000

_____________Tail´s size______________0.6077


REM "FISHIRW7"
CLS
DEFDBL A-Z
PRINT " Fisher-Irwin test"
PRINT : PRINT "_______________________________"
PRINT
PRINT " 2x2 table (for treatment comparison) "
INPUT " treat. 1: a11 , a12 "; a11, a12
INPUT " treat. 2: a21 , a22 "; a21, a22
REM n01= column 1 total
REM n02= "" " 2 "
DIM cn(1000), c01(1000), c02(1000)
cn(0) = 1: c01(0) = 1: c02(0) = 1
n01 = a11 + a21: n02 = a12 + a22
n = n01 + n02
b11 = a11: b12 = a12: b21 = a21: b22 = a22
nn01 = n01: nn02 = n02: nn = n
nn10 = b11 + b12: nn20 = b21 + b22
FOR j = 0 TO a11 + a12 - 1
cn(j + 1) = cn(j) * (n - j) / (j + 1)
NEXT j
cc = cn(a11 + a12)
FOR jj = 0 TO n01 - 1
c01(jj + 1) = c01(jj) * (n01 - jj) / (jj + 1)
NEXT jj
FOR jk = 0 TO n02 - 1
c02(jk + 1) = c02(jk) * (n02 - jk) / (jk + 1)
NEXT jk
COLOR 7
PRINT
PRINT " a11 a12 a21 a22 "
PRINT "_______________________"
FOR h = 0 TO 1000
IF a12 - h < 0 OR a11 + h > n01 THEN GOTO 100
mais = c01(a11 + h) * c02(a12 - h) / cc
PRINT USING "#### #### "; a11 + h; a12 - h;
PRINT USING "#### #### "; n01 - (a11 + h); n02 - (a12 - h);
PRINT USING " ##) #.#### "; h + 1; mais
90 primo = primo + c01(a11 + h) * c02(a12 - h) / cc
NEXT h
100 PRINT " ____________________________": PRINT
PRINT " TAIL PROB. ";
PRINT USING " ##.####"; primo
END

_____________________
.