Procedure demonstrated with an example

  1. The Fisher's Exact test
  2. Example: analyze the data with Fisher's Exact test
  3. Output and interpretation

The Fisher's Exact Test

Fisher's exact test is particularly appropriate when dealing with small samples. This section only covers test on a 2 by 2 table. That is, there are two variables, each has two categories.

Comparing to the contingency chi-square test, Fisher's exact test is to exaclty calculate the p-value rather than being based on an asymptotic approximation. For Fisher's test, the P-value for the nondirectional test is NOT twice the p-value for the directional test, as would be for a normal test.

Analyzing the data with Fisher's test

Consider the following example. Extracorporeal membrane oxygenation (ECMO) is a potentially life-saving procedure that is used to treat newborn babies who suffer from severe respiratory failure. An experiment was conduted in which 29 babies were treated with EcMO and 10 babies were treated with conventional medical therapy (CMT). Among the 5 babies died, 4 were treated with CMT and among the 34 babies survided, 6 were treated with CMT. Data is available as "ecmo.csv".

Open the data set from SAS. Or import with the following command.

 
   data ecmo;
	infile "H:\sas\data\ecmo.csv" dlm=',' firstobs=2;
	input subject treament $  result $;
    run;
 
   
proc freq data=ecmo;
	title "Fish's exact test for small 2 by 2 tables";
	tables treatment*result / chisq expected norow nocol nopercent;
run; 

 

The control option "expected" asks for expected value for assumption checking.

The other options such as "norow" eliminate unwanted outputs for clarity.

The key output and intepretation

           		Fish's exact test for small 2 by 2 tables                           
                                                                   
                                       The FREQ Procedure

                                  Table of treatment by result

                               treatment     result

                               Frequency|
                               Expected |die     |live    |  Total
                             -----------------------------------------
                               CMT      |      4 |      6 |     10
                                        | 1.2821 | 8.7179 |
                             -----------------------------------------
                               ECMO     |      1 |     28 |     29
                                        | 3.7179 | 25.282 |
                              ----------------------------------------
                               Total           5       34       39


 					Fisher's Exact Test
                              ----------------------------------------
                               Cell (1,1) Frequency (F)         4
                               Left-sided Pr <= F          0.9996
                               Right-sided Pr >= F         0.0110

                               Table Probability (P)       0.0106
                               Two-sided Pr <= P           0.0110

                                        Sample Size = 39





The p-value for the Fisher's exact test is 0.011 for a nondirectional test. So the epxeriment provided strong evidence that ECMO really is different from CMT. Furthermore, the P-value for a directional test (Ha: ECMO > CMT) is 0.011 (happen to the same as the nondirectional test), so we could also conclude that ECMO really is better than CMT.