[過去ログ] 高校数学の質問スレ Part437 (1002レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
326
(1): 2024/07/26(金)08:30 ID:NLrXJ64M(1/4) AAS
>>323
期待値を移動中にスマホで計算。
1181991429255578143/66691735689600000
=17.723206886635
327: 2024/07/26(金)08:37 ID:NLrXJ64M(2/4) AAS
シミュレーション結果と近似しているので良さげだな。
329
(1): 2024/07/26(金)11:30 ID:NLrXJ64M(3/4) AAS
内視鏡バイト終了。
帰路では>323をRに移植でもするかな。
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-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.039s