在 Wolfram 语言中,统计函数可接受列表或符号分布作为参数:
计算一组数字的均值:
In[1]:= | ![]()
⨯
Mean[{1, 2, 4, 5}] |
Out[1]= | ![]() |
求多个列表的相关:
In[2]:= | ![]()
⨯
Correlation[{1, 3, 5}, {6, 4, 2}] |
Out[2]= | ![]() |
求泊松分布的标准差:
In[3]:= | ![]()
⨯
StandardDeviation[PoissonDistribution[2]] |
Out[3]= | ![]() |
计算一组符号的矩:
In[1]:= | ![]()
⨯
Moment[{x, y, z}, 2] |
Out[1]= | ![]() |
获取分布的矩母函数:
(键入 ESCmESC 可得到μ
,或键入 ESCsESC 得到 σ
.)
In[2]:= | ![]()
⨯
MomentGeneratingFunction[NormalDistribution[\[Mu], \[Sigma]], t] |
Out[2]= | ![]() |
用 RandomVariate 产生统计数据:
(用 //Short 来得到输出的简短总结.)In[1]:= | ![]()
⨯
RandomVariate[NormalDistribution[0, 1], {500, 2}] // Short |
Out[1]= | ![]() |
可视化所得数据:
In[2]:= | ![]()
⨯
Histogram3D[%] |
Out[2]= | ![]() |
快速参考:统计矩与母函数 »
快速参考:统计可视化 »