# Test exacto de Fisher para tablas de contingencia
# Diestro Zurdo TOTAL
# Hombre 43 9 52
# Mujer 44 4 48
# TOTAL 87 13 100
sexo <- c(rep("H",52), rep("M",48))
dz <- c(rep("d",43),rep("z",9),rep("d",44),rep("z",4))
tabla <- table(sexo,dz)
print(tabla)
## dz
## sexo d z
## H 43 9
## M 44 4
test <- fisher.test(tabla)
print(test)
##
## Fisher's Exact Test for Count Data
##
## data: tabla
## p-value = 0.2392
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.09150811 1.71527769
## sample estimates:
## odds ratio
## 0.4378606
cat("Por lo tanto no hay diferencias entre hombres y mujeres en cuanto a ser diestro o zurdo")
## Por lo tanto no hay diferencias entre hombres y mujeres en cuanto a ser diestro o zurdo