« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Random Processes
Slice Distributions from Data
Compare the PDF from the process and simulation data at time
.
In[1]:=
X
proc = WienerProcess[1, 1]; data = RandomFunction[proc, {0, 10, 0.1}, 10^3];
In[2]:=
X
Show[Plot[Evaluate[PDF[proc[5], x]], {x, -1, 11}, Filling -> Axis], SmoothHistogram[data["SliceData", 5], Filling -> Axis], PlotRange -> {{-1, 11}, All}]
Out[2]=
Compute several different slice distributions and overlay on simulation data.
In[3]:=
X
plot1 = ListLinePlot[RandomFunction[proc, {0, 10, 0.1}, 25]]; plot2 = DistributionChart[Transpose@(data["SliceData", Range[10]]), ChartStyle -> Opacity[0.7]]; Show[plot1, plot2, PlotRange -> {{0, 11}, Automatic}]
Out[3]=