Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. sample(1:6, size=1, replace = TRUE)
  2.  
  3. p <- 6/37
  4. myprobs <- c(2/3 * p, p, p, p, p, 3/2*p)
  5.  
  6. set.seed(1)
  7. x <- sample(1:6, size = 100, replace = TRUE, prob = myprobs)
  8.  
  9. barplot(table(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement