Wolfram 语言含有范围广泛的概率函数,以及几百个符号分布.
用数学符号计算阶乘:
In[1]:= | ![]()
⨯
5! |
Out[1]= | ![]() |
对于组合,可使用 Binomial:
In[2]:= | ![]()
⨯
Binomial[4, 3] |
Out[2]= | ![]() |
计算二项分布的概率:
(键入 ESCdistESC 可得到
符号.)
In[1]:= | ![]()
⨯
Probability[x == 1, x \[Distributed] BinomialDistribution[1, 1/2]] |
Out[1]= | ![]() |
计算多项式的期望:
In[2]:= | ![]()
⨯
Expectation[2 x + 3, x \[Distributed] NormalDistribution[]] |
Out[2]= | ![]() |