bolts calculation, informed by some basic concepts of probability examined in Chapter 5.
There are several paths we could follow at this point, all of which would eventually lead to the same destination. I choose the one most likely to make sense to the beginning student and least likely to bring the nonmathematical reader to the brink of tears. As you saw in Chapter 5, the merechance probability of any particular outcome is fundamentally a proportion of the general form
 P_{(outcome)} =

number of possibilities favorable
to the occurrence of the outcome total number of pertinent possibilities

We begin by figuring out the value of the denominator of the expression, which is the total number of pertinent possibilities. Here is something else you will recognize from Chapter 5. If you were to toss 19 coins, the number of possible combinations that would yield exactly 9 heads out of those 19 tosses would be

N! k!(N—k)!
 =

19! 9!10!
 = 92,378


 X


 No
 Yes

Y
 Yes


 9

No


 10

 10
 9
 19


The same concept applies when you are assessing 19 subjects with respect to the possession or nonpossession of characteristic X. The total number of combinations that would yield exactly 9 subjects displaying X and 10 subjects not displaying it would be

 X


 No
 Yes

Y
 Yes


 9

No


 10

 10
 9
 19


And similarly for characteristic Y. The total number of combinations that would involve exactly 9 subjects displaying Y and 10 subjects not displaying it would be
The total number of possible outcomes in which you might have exactly 9 out of 19 subjects displaying X and exactly 10 out of the same 19 subjects displaying Y is accordingly
92,378 x 92,378 = 8,533,694,884
So here is how our probability calculation would begin to shape up for any particular one of the 10 possible outcomes enumerated above, Ô1 through Ô10.
 P_{(outcome)} =

number of possibilities favorable
to the occurrence of the outcome total number of pertinent possibilities

 P_{(outcome)} =

? 8,533,694,884

All we now have to do for each particular outcome is replace the question mark with a specific numerical value.

 X


 No
 Yes

Y
 Yes
 0
 9
 9

No
 10
 0
 10

 10
 9
 19


We begin with Ô10, which is the most extreme of the possible "this large or larger" outcomes and by far the easiest to examine. For each of the 92,378 possible combinations that would yield exactly 9 subjects displaying X and 10 subjects not displaying it, there is exactly one of the Y combinations that would involve every instance of X being associated with an instance of Y and every instance of notX being associated with an instance of notY. So the probability of this particular outcome would be

 P_{(Ô10)} =

92,378 8,533,694,884
 =

1 92,378


 X


 No
 Yes

Y
 Yes
 1
 8
 9

No
 9
 1
 10

 10
 9
 19


The logic is the same with the less extreme outcomes, although rather more complicated in computational detail. Here, to illustrate, is the next less extreme outcome, Ô9. For each of the 92,378 possible combinations that would yield exactly 9 subjects displaying X and 10 subjects not displaying it, the number of combinations that would produce the particular correspondences of X and Y shown in the first column of the above table (X="No") would be
and the number of combinations that would produce the particular correspondences shown in the second column (X="Yes") would be
So the number of combinations that would produce the overall array of frequencies in the gray cells of the table would be
10 x 9 x 92,378 = 8,314,020
and the probability associated with this outcome is accordingly

 P_{(Ô9)} =

8,314,020 8,533,694,884
 =

90 92,378


 X


 No
 Yes

Y
 Yes
 2
 7
 9

No
 8
 2
 10

 10
 9
 19


One more turn of this wheel and we are finished, at least for the present example. Here is the table for the actually observed outcome, Ô8. For each of the 92,378 possible combinations that would yield exactly 9 subjects displaying X and 10 subjects not displaying it, the number of combinations that would produce the particular correspondences of X and Y shown in the first column of the table would be
and the number of combinations that would produce the particular correspondences shown in the second column would be
So the number of combinations that would produce the overall array of frequencies in the gray cells of this table would be
45 x 36 x 92,378 = 149,652,360
and the probability associated with this outcome is accordingly

 P_{(Ô8)} =

149,652,360 8,533,694,884
 =

1620 92,378

The rest of the ride is a smooth one along a familiar path. The probability of getting a result "this large or larger" is the sum of the separate probabilities for Ô8, Ô9, and Ô10:


1620 92,378
 +

90 92,378
 +

1 92,378

=

1711 92,378
 = .0185

And that, in a nutshell, is the probability that our investigators can take to the printing press. If the null hypothesis were true, the exact probability of finding a positive association between X and Y as large as the one observed would be a scant P=.0185. The investigators can therefore reject the null hypothesis with a comfortable degree of confidence and conclude that characteristics X and Y do tend to be associated for this particular type of subject.
¶A Simpler Formulaic Approach
Once you have the concepts, the actual calculations for the Fisher test can be performed by way of a relatively simple formulaic structure. For any 2x2 contingency table, designate the cell frequencies as a, b, c, and d, and the marginal totals as a+b, c+d, etc., with N equal to the sum of the frequencies in the four cells.
 a
 b
 a+b

c
 d
 c+d

a+c
 b+d
 N


Given this notation, the exact probability of any particular outcome can then be calculated according to the formula
 P_{(outcome)}
 =
 (a+b)! (c+d)! (a+c)! (b+d)! N! a! b! c! d!


In performing factorial operations
recall that 0!=1 and 1!=1.


Thus, for outcome 10 in the above example:

P_{(Ô10)}
 =
 9! 10! 10! 9! 19! 0! 9! 10! 0!
 = .000010825

Note that this rounded decimal value
is equivalent to the ratio 1/92,378
calculated above.


For outcome 9:

P_{(Ô9)}
 =
 9! 10! 10! 9! 19! 1! 8! 9! 1!
 = .000974258


And for Ô8, the observed outcome:

P_{(Ô8)}
 =
 9! 10! 10! 9! 19! 2! 7! 8! 2!
 = .017536642

Equivalent to 1620/92,378


¶The Fisher Test for Directional and NonDirectional Hypotheses
If you were to perform these calculations for each of the 10 possible outcomes in the example, the composite result would constitute the sampling distribution of outcomes for the general case where you have a 2x2 contingency table with these particular marginal totals. The following graph shows the outlines of this sampling distribution. As usual in such depictions, the vertical axis represents relative frequency, which is of course the same thing as probability.











 Ô1
 Ô2
 Ô3
 Ô4
 Ô5
 Ô6
 Ô7
 Ô8
 Ô9
 Ô10

As our investigators begin with a directional hypothesis, their probability assessment needs to refer to only one of the two tails of this distribution, namely, the "this large or larger" portion on the right that includes the probabilities for Ô8, Ô9, and Ô10. If they had instead begun with a nondirectional hypothesis—in effect, "Let's do this and see if there's an association one way or the other"—they would also have to refer to the portion of the left tail that includes the possible outcomes that are "this large or larger" in the opposite direction.
Ô1

 Ô5

 Ô10

9
 0

 5
 4

 0
 9

1
 9

 5
 5

 10
 0


Within this context, the concept of "this large or larger" is defined by the degree to which the frequencies within the cells are arrayed disproportionately, so as to fall predominantly along the upward diagonal, as in Ô10, or along the downward diagonal as in Ô1. The degree of disproportion within any array of cell frequencies—in effect, the degree of ostensible association in either direction—can be measured by the absolute difference
 disproportion =

 a a+b
 —
 c c+d


The following table shows this value as calculated for each of the 10 possible outcomes. The disproportion measure for Ô8, the observed outcome, is indicated in red, and the measures for the other outcomes that are "this large or larger," in either direction, are shown in boldface.
Ô1

 Ô2

 Ô3

 Ô4

 Ô5

 Ô6

 Ô7

 Ô8

 Ô9

 Ô10

9
 0

 8
 1

 7
 2

 6
 3

 5
 4

 4
 5

 3
 6

 2
 7

 1
 8

 0
 9

1
 9

 2
 8

 3
 7

 4
 6

 5
 5

 6
 4

 7
 3

 8
 2

 9
 1

 10
 0

0.90

 0.69

 0.48

 0.27

 0.06

 0.16

 0.37

 0.58

 0.79

 1.00

The short of it is that the test of a nondirectional hypothesis would also have to fold in the probabilities for Ô1 and Ô2, which you would find upon calculation to be
P_{(Ô1)} = .000108251and
P_{(Ô2)} = .004384161
Adding these values to the righttail probability (.0185) already calculated yields a nondirectional twotailed probability of P=.023.
¶A Handy NumberCruncher
Although the concepts are relatively simple, the calculations, as I warned at the outset, can be rather laborious. I am therefore providing you with this handy calculator, which will perform the Fisher exact probability test for any particular 2x2 table of crossclassified frequency data, providing that the numbers are not too large. Just for practice, and to assure yourself that the calculator actually works, you might want to try entering some of the 2x2 frequency arrays for the various outcomes, Ô1, Ô2, etc., of the foregoing example. You need not enter anything into the cells that contain "", as these marginal totals will be calculated automatically.
Although the Fisher test is designed for use with relatively small samples, the programming for this calculator will actually handle fairly large samples, up to about N=100, depending on how the frequencies are arrayed within the four cells.
Data Entry: