[過去ログ]
高校数学の質問スレ Part437 (1002レス)
高校数学の質問スレ Part437 http://rio2016.5ch.net/test/read.cgi/math/1721071007/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
330: 132人目の素数さん [sage] 2024/07/26(金) 12:07:12.65 ID:NLrXJ64M 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の分数解で良さそう。 http://rio2016.5ch.net/test/read.cgi/math/1721071007/330
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 672 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.008s