# plotting sine of a wiener process and calculating derivative

How can I plot the sine of a Wiener process and compute its derivative? I only found the WienerProcess function in mathematica (version 9), but I'm not sure how to apply it.

• FWIW, data = RandomFunction[WienerProcess[.3, .5], {0, 1, 0.01}]; g[{a_, b_}] := {a, Sin[b]}; ds = Flatten[Normal[data], 1]; dg = Table[{i*.01, (ds[[i + 1, 2]] - ds[[i, 2]])/.01}, {i, 1, 100}]; ListLinePlot[g /@ ds] ListLinePlot[dg] – egwene sedai Jun 1 '15 at 13:48

Is this what you are looking for?

path = RandomFunction[WienerProcess[2, 3], {0, 10, 0.01}]["Path"];

sinofpath = {#1, Sin[#2]} & @@@ path;

derivativeofsin =
Transpose@{sinofpath[[All, 1]], DerivativeFilter[sinofpath[[All, 2]], {1}]};

derivativeofpath =
Transpose@{path[[All, 1]], DerivativeFilter[path[[All, 2]], {1}]};


I am not sure whether in your question you ask for the derivative of the sine of the path, or the derivative of the path itself. Both are calculated above anyway.

Show[
ListLinePlot[Legended[path, "original Wiener path"],
PlotStyle -> Darker@Purple, Filling -> Axis],

ListLinePlot[Legended[sinofpath, "sin of path"]],
ImageSize -> Large, PlotRange -> All
] • exactly what I wanted, thank you very much! – holistic Jun 2 '15 at 8:29