Suppose we have the following data set:
Men Women
Dieting 10 30
Non-dieting 5 60
If I run the Fisher exact test in R then what does alternative = greater (or less) imply? For example:
mat = matrix(c(10,5,30,60), 2,2)
fisher.test(mat, alternative="greater")
I get the p-value = 0.01588 and odds ratio = 3.943534. Also, when I flip the rows of the contingency table like this:
mat = matrix(c(5,10,60,30), 2, 2)
fisher.test(mat, alternative="greater")
then I get the p-value = 0.9967 and odds ratio = 0.2535796. But, when I run the two contingency table without the alternative argument (i.e., fisher.test(mat)) then I get the p-value = 0.02063.
- Could you please explain the reason to me?
- Also, what is the null hypothesis and alternative hypothesis in the above cases?
Can I run the fisher test on a contingency table like this:
mat = matrix(c(5000,10000,69999,39999), 2, 2)
PS: I am not a statistician. I am trying to learn statistics so your help (answers in simple English) would be highly appreciated.