KNOWLEDGEBASE - ARTICLE #1750

Analyzing Contingency Tables using Fisher's Exact Test

Step-by-Step Examples:
Analyzing Contingency Tables using Fisher's Exact Test in Prism

A contingency table shows numerically the results of an experiment in which the outcome is a categorical variable. Commonly, two groups of subjects are studied, and there are two possible outcomes. Suppose you treat 126 subjects with either a placebo or a new drug designed to decrease the incidence of coronary artery restenosis within 6 months after angioplasty. The numbers of subjects experiencing each outcome may be arranged on a 2 x 2 contingency table as follows:

   
Restenosis within 6 months after angioplasty?
   
Yes
No
Treatment

Placebo

23
41
     

Drug-treated

16
46
 

In this step-by-step example, we'll analyze this table using Fisher's Exact test to answer the following question: If there were really no association between treatment and occurrence of restenosis within the observation period, what would be the chance that random sampling would produce an apparent association as strong, or stronger, than that observed in this experiment?

Prism will analyze contingency tables not only for experiments, but also for cross-sectional, prospective, or retrospective case-control studies. To learn more about these distinctions or about contingency analysis in general, consult Analyzing Data with GraphPad Prism (pdf) .

Enter the Data
When you launch Prism, the Welcome to Prism dialog appears.  On the left side of the Welcome dialog, tell Prism how to format your data table. Choose Contingency and make sure the option Enter or import data into a new table is selected.

When you click Create, Prism displays the formatted table. Enter the data—numbers of subjects falling into each mutually exclusive category, not fractions or percentages—as follows:

Click on the graph in the left-side Prism navigator and create the default bar graph. 

 

Choose the Analysis and the Options

 

 

 

 

 

 

 

 

 

 

Click Analyze in the toolbar and choose Chi-square (and Fisher's Exact) test. Leave all the data sets checked and click OK. In the Contingency Tables dialog, accept the choice of Fisher's exact test, which is the default when you're analyzing a 2 x 2 table.

 

In the same dialog, set the checkboxes to do the optional Relative Risk calculation. All the settings are shown below; you can get more help understanding these settings by clicking ? in the lower left corner of the dialog box. 

View the Results
When you click OK, Prism runs the analysis and displays the results page.

The p-value of 0.2508 indicates there is insufficient evidence to state an association between treatment and occurrence of restenosis within the observation period. Restenosis occurred in 25.8% of patients receiving the drug compared with 35.9% receiving placebo, corresponding to a relative risk of 0.7181 (25.8/35.9). Thus, the observed risk of restenosis was approximately 28% lower in the drug group. However, Fisher's exact test did not provide sufficient evidence of an association between treatment and restenosis.

 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.