Skip to content

Instantly share code, notes, and snippets.

@cdesante
Created November 7, 2012 22:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cdesante/4034907 to your computer and use it in GitHub Desktop.
Joint Probability Example
Coin <- c()
Die <- c()
for (i in 1:1000) {
Coin[i] <- sample(c("Heads", "Tails"), 1)
Die[i] <- sample(c(1,2,3,4,5,6), 1)
}
table(Coin, Die)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment