24/04/23 07:40:29.46 mBdwwsnl.net
>>409
t分布でやってみる。
In[1]:= ts={9,7,8,8,12,13,10,14,13,15,19,19,16,12,7,2,2,7,3,5,9,5,8,13,15,11,13,12,9,4};
In[2]:= Quantile[StudentTDistribution[Mean[ts], StandardDeviation[ts],Length@ts-1], {0.025,0.975}]
Out[2]= {0.55858, 19.4414}
WolframにはT分布で95%CIを計算する関数が用意されていた。
In[3]:= Needs["HypothesisTesting`"]
In[4]:= StudentTCI[Mean[ts], StandardDeviation[ts],Length@ts-1] // N
Out[4]= {0.55858, 19.4414}