MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Weiner process

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63912] Re: Weiner process
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Sat, 21 Jan 2006 05:05:42 -0500 (EST)
  • References: <dqqc98$m0j$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

A simple way to generate a random walk is as follows:

x[t_] := x[t] = x[t - 1] + Random[Real, {-0.01, 0.01}];
x[t_] := 0 /; t <= 0;

This is defined as a "finite state machine", whose initial state is 0. It 
uses a uniformly distributed step size, and it "memorises" each step as it 
is generated. This approach generalises readily.

Plot the first 1000 steps of the random walk:

ListPlot[Table[x[t], {t, 0, 1000}], PlotJoined -> True];

For your entertainment here is the Lorenz attractor done in the same style 
as above:

Needs["Graphics`Graphics3D`"];

e = 0.013;
r = 28;

x[t_] := x[t] = {x[t - 1][[1]] + 10*e*(x[t - 1][[2]] - x[t - 1][[1]]),
     x[t - 1][[2]] + e*(r*x[t - 1][[1]] - x[t - 1][[1]]*x[t - 1][[3]] -
        x[t - 1][[2]]), x[t - 1][[3]] + e*(x[t - 1][[1]]*x[t - 1][[2]] -
        (8*x[t - 1][[3]])/3)};
x[1] = {0.1, 0.1, 10.};

ScatterPlot3D[Table[x[t], {t, 1000}], PlotJoined -> True, AspectRatio -> 1];

Steve Luttrell

"Don" <ddarling at math.uci.edu> wrote in message 
news:dqqc98$m0j$1 at smc.vnet.net...
> For a Monte Carlo simulation I need samples of the Brownian motion
> (Wiener)process X(t), 0<t<1.  Does anyone know of a data base where I can
> find them, or of a program to generate them?
>
> 



  • Prev by Date: When reopen notebook, strange indentation and output is Null (ver5.2)
  • Next by Date: Re: Simplifying the root of a quadratic
  • Previous by thread: Re: Weiner process
  • Next by thread: Re: Weiner process