a + b + c + d mi = max(0, e + g - n) length = min(e, g) - mi prob = [Stats(mi + i, e, f, g, n) for i in 0:length] println("Fisher's Exact Test for Count Data (two tailed)") println("p value =", sum(prob[prob .<= Stats(a, e, f, g, n)])) end;...
–data<-sample(1:length(es),N,c(es),replace=TRUE) –tdata<-table(data) –mat<-matrix(tdata,nrow=n) –chiout<-chisq.test(mat,correct=FALSE) –fisherout<-fisher.test(mat) –list(table=mat,chisq=chiout$st,p=chiout$p.value,fisherp=fisherout$p.value) ...