We will simulate a random walk in two dimensions, and in particular will find numerical estimates for the distance traveled as a function of time. First let's warm up by looking at walks of fixed length.
Simulate a symmetric random walk of length 10^3 in 2D:
The above analysis tells us nothing about the sizes of statistical errors on the data points, or on the resultant fit. To get these, let's apply a bootstrap analysis.
Compute the mean and standard deviation of the exponent across the bootstrap ensemble, showing that the distance travelled as a function of step count varies according to a square-root law, as expected: