Stochastic Integration for Poets
November 2024.
When you start reading diffusion papers, you'll quickly come across an equation like this:
$$dx = f(x,t)dt + g(x,t)dw$$
where $w$ is Brownian motion. When I first saw these, I admit that I just thought about the discretized version
$$\Delta_x = f(x,t)\Delta_t + g(x,t)\Delta_w$$
and moved on. You can generate approximate samples in code easily enough:
dt = 0.001 x_last = 0 t = 0 while t < 1: dw = np.