高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
前次1-
抽出解除 レス栞

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
113
(1): 2024/08/21(水)11:44 ID:trPnwZW4(5/6) AAS
シミュレーションによる検証

Wolfram Language 14.0.0 Engine for Microsoft Windows (64-bit)
Copyright 1988-2023 Wolfram Research, Inc.

In[1]:= j[n_] :=( (* n人でジャンケンして勝者が決まるまでの回数と勝者の数*)
count=0;
Until[Length@Union@a==2,a=RandomChoice[Range[3],n];count++];
b=Sort@Union@a;
If[b=={1,2}, winners=Count[a,2]];
If[b=={2,3}, winners=Count[a,3]];
If[b=={1,3}, winners=Count[a,1]] ;
{winners,count}
)

In[2]:=
In[2]:= sim[n_] :=((* 勝者が一人になるまでの回数 *)
For[{winner,counts}=j[n],winner>1k=j[winner];winner=k[[1]];counts=counts+k[[2]]];
counts
)

In[3]:= res11=Table[sim[11],10^6];

In[4]:= Histogram[res11,"Scott","PDF"]

Out[4]= -Graphics-

In[5]:= Mean[res11] // N

Out[5]= 34.9504

In[6]:= Median[res11]

Out[6]= 27

In[7]:= N@Mean@Boole[#<=10&/@res11]

Out[7]= 0.154785

In[8]:= 449687340186660888579056289638229806808082/2909321189362570808630465826492242446680483

449687340186660888579056289638229806808082
Out[8]= -------------------------------------------
2909321189362570808630465826492242446680483

In[9]:= % // N

Out[9]= 0.154568
116: 2024/08/21(水)17:53 ID:EiqnP9Ex(2/5) AAS
>>113
>>69にはいつになったら答えられるんだよゴミ
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.042s