Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ball.3 = replicate( 10^6, sample(1:4, 3, prob=c(.4,.3,.2,.1))[3] )
- table(ball.3)/10^6
- ball.3
- 1 2 3 4
- 0.206875 0.262178 0.317036 0.213911 # simulated probabilities
- c(26,33,40,27)/126
- [1] 0.2063492 0.2619048 0.3174603 0.2142857 # your computations
Add Comment
Please, Sign In to add comment