Monte Carlo Method for Probabilities and Expectations

Calculate the probability of an event:
In[1]:=
Click for copyable input
Out[1]=
Obtain an estimate based on simulation:
In[2]:=
Click for copyable input
Out[2]=
Calculate the expectation for an expression:
In[3]:=
Click for copyable input
Out[3]=
Obtain an estimate based on simulation:
In[4]:=
Click for copyable input
Out[4]=