0
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ 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] $\endgroup$ – egwene sedai Jun 1 '15 at 13:48
1
$\begingroup$

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
]

Mathematica graphics

| improve this answer | |
$\endgroup$
  • $\begingroup$ exactly what I wanted, thank you very much! $\endgroup$ – holistic Jun 2 '15 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.