« View all new features in
Mathematica
9
◄
previous

next
►
New in
Mathematica
9
›
Enhanced Probability & Statistics
Monte Carlo Method for Probabilities and Expectations
Calculate the probability of an event.
In[1]:=
X
NProbability[x > 1, x \[Distributed] NormalDistribution[]]
Out[1]=
Obtain an estimate based on simulation.
In[2]:=
X
NProbability[x > 1, x \[Distributed] NormalDistribution[], Method > "MonteCarlo"]
Out[2]=
Calculate the expectation for an expression.
In[3]:=
X
NExpectation[x Sin[x] + 1, x \[Distributed] NormalDistribution[]]
Out[3]=
Obtain an estimate based on simulation.
In[4]:=
X
NExpectation[x Sin[x] + 1, x \[Distributed] NormalDistribution[], Method > "MonteCarlo"]
Out[4]=