18/07/03 14:39:38.71 22JZXDLY.net
>>483
> mean(replicate(1e5,which(sample(x)==1)[1]))
[1] 10.5883
>
理論値でも3行ですんだ
> y=numeric(48)
> for(i in 1:48) y[i]=i*choose(48,i-1)*factorial(i-1)*4*factorial(52-i)/facto
<ose(48,i-1)*factorial(i-1)*4*factorial(52-i)/factor ial(52)
> sum(y)
[1] 10.59982