library(DescTools)
A = c(35, 44, 39, 50, 48, 29, 60, 75, 49, 66)
B = c(17, 23, 13, 24, 33, 21, 18, 16, 32)
RunsTest(A, B, alternative = 'less', exact = TRUE)
##
## Wald-Wolfowitz Runs Test
##
## data: A and B
## runs = 4, m = 10, n = 9, p-value = 0.001764
## alternative hypothesis: true number of runs is less than expected
RunsTest(A, B, alternative = 'less', exact = FALSE)
##
## Wald-Wolfowitz Runs Test
##
## data: A and B
## z = -2.8287, runs = 4, m = 10, n = 9, p-value = 0.002337
## alternative hypothesis: true number of runs is less than expected