We do a Fisher test to test whether males cross their legs with the right leg above significantly more frequently than females.
male_left_leg_above <- 97 #85 #75 #71 #51 #48 #40 #22 #8
male_right_leg_above <- 163 #149 #125 #121 #101 #86 #69 #41 #17
female_left_leg_above <- 336 #308 #271 #264 #226 #216 #170 #113 #45
female_right_leg_above <- 383 #366 #320 #311 #279 #261 #198 #142 #47
legPosition <-t(matrix(c(male_left_leg_above, male_right_leg_above,female_left_leg_above,female_right_leg_above), nrow=2, dimnames=list(LegPosition=c("LeftLegOver", "RightLegOver"), sex=c("Male", "Female"))))
legPosition
LegPosition
sex LeftLegOver RightLegOver
Male 97 163
Female 336 383
fisher.test(legPosition, alternative="less")
Fisher's Exact Test for Count Data
data: legPosition
p-value = 0.005247
alternative hypothesis: true odds ratio is less than 1
95 percent confidence interval:
0.0000000 0.8747096
sample estimates:
odds ratio
0.6786071
fisher.test(legPosition, alternative="two.sided")
Fisher's Exact Test for Count Data
data: legPosition
p-value = 0.008806
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.5010386 0.9160688
sample estimates:
odds ratio
0.6786071
male_left_leg_aboveJF <- 4
male_right_leg_aboveJF <- 13
female_left_leg_aboveJF <- 4
female_right_leg_aboveJF <- 4
legPositionJF <- t(matrix(c(male_left_leg_aboveJF, male_right_leg_aboveJF,female_left_leg_aboveJF,female_right_leg_aboveJF), nrow=2, dimnames=list(LegPosition=c("LeftLegOver", "RightLegOver"), sex=c("Male", "Female"))))
total <- legPositionJF + legPosition
print(total)
LegPosition
sex LeftLegOver RightLegOver
Male 101 176
Female 340 387
fisher.test(total, alternative="less")
Fisher's Exact Test for Count Data
data: total
p-value = 0.001971
alternative hypothesis: true odds ratio is less than 1
95 percent confidence interval:
0.0000000 0.8376084
sample estimates:
odds ratio
0.6534736
fisher.test(total, alternative="two.sided")
Fisher's Exact Test for Count Data
data: total
p-value = 0.003522
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.4856752 0.8763214
sample estimates:
odds ratio
0.6534736