# Fisher's exact test in R

First, I am no expert but I am analyzing some marketing data. I have information on two versions of the same site, and I have data on the number of times people filled out a form on each version of the site. I want to know if one of the site variation performs better at generating more filled out forms.

Sample data:

dat2 = matrix(c(10,50,35,40), ncol=2)
dat2
Site 1                Site 2
Filled out form                10                    35
Did not fill out form          50                    40

> fisher.test(dat2)

Fisher's Exact Test for Count Data

data:  dat2
p-value = 0.0002381
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.09056509 0.54780215
sample estimates:
odds ratio
0.2311144


I'm really not sure if I set up the test properly, but I can obviously reject the null hypothesis given the low p-value. Site 2 converts better than site 1 at a statistically significant threshold.

Given the problem, am I performing the correct test?

-

You're doing everything fine. However, I would recommend Barnard's exact test than Fisher exact test.

-
Thank You, I just read that article right before posting my question. Will look into it. –  ATMathew Nov 18 '11 at 0:01
Fisher's test is not as powerful as others. The ordinary chi-square test is almost always more accurate than Fisher's "exact" test. The old myth that expected cell frequencies must exceed 5 is not true. –  Frank Harrell Nov 18 '11 at 0:29
Mehta and Senchaudhuri (2003) explain why Barnard's test can be more powerful than Fisher's under certain conditions. For 2 × 2 tables the loss of power due to the discreteness dominates over the loss of power due to the maximization, resulting in greater power for Barnard’s exact test. But as the number of rows and columns of the observed table increase, the maximizing factor will tend to dominate, and Fisher’s exact test will achieve greater power than Barnard’s. cytel.com/Papers/twobinomials.pdf –  Biostat Nov 18 '11 at 1:09