# Random walks in Manhattan

### "Random Walks in Manhattan", pixels in Python and NumPy.

The black curve is a pure random walk in two dimensions with independent zero mean Gaussian increments of equal variance in each dimension. The red curve is an Ornstein Uhlenbeck process in two dimensions with mean at (0,0). Unlike a pure random walk, an Ornstein Uhlenbeck process experiences a pull back towards the origin whenever it wanders away from it in any direction, and therefore the OU process does not travel as far and wide as the random walk. Each image shows a trajectory that is a subset of the previous, showing \(2 \times 10^n\) steps, with \(n = 1,\ldots,6\). Notice how, when the number of steps is small, the RW and the OU processes look very similar, but with a larger number of steps, the mean reverting property of the OU process makes its trajectory look very different.

**"Gaussian script"**

The piece above represents a new random alphabet. It was drawn by generating a sequence of 20 sample paths of a Gaussian Process in two dimensions with covariance kernel given by a squared exponential \(e^{-d^2/\lambda}\) where d is the distance in input space and \(\lambda\) is a relaxation constant. Note that the Ornstein Uhlenbeck process is also a Gaussian Process, with a covariance kernel given by the related absolute value exponential \(e^{-|d|/\lambda}\).