« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Random Processes
Mean, Median, and Variance Functions from Data
Compute mean and other functions from processes or temporal data.
In[1]:=
X
proc = WienerProcess[1, 1/2]; data = RandomFunction[proc, {0, 5, 0.1}, 25];
In[2]:=
X
{Mean[proc[2.5]], Mean[data[2.5]]}
Out[2]=
Compare exact and estimated mean and standard deviation functions.
In[3]:=
X
{Plot[{Mean[proc[t]], Mean[data[t]]}, {t, 0, 5}], Plot[{StandardDeviation[proc[t]], StandardDeviation[data[t]]}, {t, 0, 5}]}
Out[3]=
Combine with simulation data.
In[4]:=
X
Show[ListLinePlot[data], Plot[{Mean[proc[t]] - 3 StandardDeviation[proc[t]], Mean[proc[t]] + 3 StandardDeviation[proc[t]]}, {t, 0, 5}, Filling -> {1 -> {2}}]]
Out[4]=