[過去ログ] 高校数学の質問スレ Part437 (1002レス)
上下前次1-新
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
330: 2024/07/26(金)12:07 ID:NLrXJ64M(4/4) AAS
p=c(1/10,2/10,3/10,4/10)
flg = function(x) any(c(sum(x==1)<1,sum(x==2)<2,sum(x==3)<3,sum(x==4)<4))
sim=function(){
count=10
x=sample(4,10,replace=TRUE,prob=p)
while(flg(x)){
count=count+1
x=c(x,sample(4,1,replace=TRUE,prob=p))
}
count
}
res=replicate(10^5,sim())
mean(res)
quantile(res,p=c(0.025,0.5,0.975))
sort(table(res),decreasing=TRUE)[1:5]
結果
[1] 17.71985
2.5% 50% 97.5%
10 16 37
res
13 14 12 15 16
9664 9414 9055 8832 7777
>326の分数解で良さそう。
上下前次1-新書関写板覧索設栞歴
あと 672 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.009s