MATHEMATICA FEATURED EXAMPLE

Particle Moving between Two Barriers

The collision times for a particle moving between two barriers are distributed exponentially, with a mean of three microseconds. If the particle starts at the right-hand barrier () and moves toward the left-hand barrier (), then simulate the collision process for 100 microseconds.

    
In[131]:=
Click for copyable input
In[132]:=
Click for copyable input
In[133]:=
Click for copyable input
Out[133]=
Variance for the slice distribution is 1:
In[134]:=
Click for copyable input
Out[134]=
Compare with the variance of a sample:
In[135]:=
Click for copyable input
Out[135]=
New to Mathematica? Find your learning path »
Have a question? Ask support »