Guest User

Untitled

a guest
Aug 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ball.3 = replicate( 10^6, sample(1:4, 3, prob=c(.4,.3,.2,.1))[3] )
  2. table(ball.3)/10^6
  3. ball.3
  4. 1 2 3 4
  5. 0.206875 0.262178 0.317036 0.213911 # simulated probabilities
  6. c(26,33,40,27)/126
  7. [1] 0.2063492 0.2619048 0.3174603 0.2142857 # your computations
Add Comment
Please, Sign In to add comment