A contingency table is used in statistics to provide a tabular
summary of categorical data and the cells in the table are the
number of occassions that a particular combination of variables
occur together in a set of data. The relationship between
variables in a contingency table are often investigated using
Chi-squared tests. The simplest contingency table with two
variables has two levels for each of the variables. Consider a
trial comparing the performance of two challengers. Each of the
challengers undertook the trial eight times and the number of
successful trials was recorded. The hypothesis under
investigation in this experiment is that the performance of the
two challengers is similar. If the first challenger was only
successful on one trial and the second challenger was successful
on four of the eight trials then can we discriminate between
their peformance? The function fisher.test is used to perform
Fisher’s exact test when the sample size is small to avoid using
an approximation that is known to b