Created
May 18, 2014 09:20
-
-
Save casallas/20f55034b00bcbfc9215 to your computer and use it in GitHub Desktop.
Non-transitive dice and the wilcoxon test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on http://notstatschat.tumblr.com/post/63237480043/rock-paper-scissors-wilcoxon-test | |
d1 <- c(4, 4, 4, 4, 0, 0) | |
d2 <- c(3, 3, 3, 3, 3, 3) | |
d3 <- c(6, 6, 2, 2, 2, 2) | |
d4 <- c(5, 5, 5, 1, 1, 1) | |
wilcox.test(d1, d2, alternative="greater") | |
wilcox.test(d2, d3, alternative="greater") | |
wilcox.test(d3, d4, alternative="greater") | |
wilcox.test(d4, d1, alternative="greater") | |
t.test(d1, d2, alternative="greater") | |
t.test(d2, d3, alternative="greater") | |
t.test(d3, d4, alternative="greater") | |
t.test(d4, d1, alternative="greater") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment