0949132人目の素数さん垢版 | 大砲2020/07/07(火) 14:35:25.66ID:bx7umG9D >>931 2.のシミュレーション解 bag=rep(1:0,c(6,4)) sim <- function(x) sum(sample(bag,5)) re=replicate(1e6,sim()) table(re)/1e6 1 2 3 4 5 0.024026 0.237994 0.476124 0.238167 0.023689