I played with some simulated random walks. To evaluate "how wrong" 6x the standard deviation compared to the "real" peak to peak value is, I created 1000 random walks. Every walk was a million steps long. I calculated the standard deviation and the peak to peak value for every walk and compared them.

Quick note regarding peak-to-peak value of a simulated random walk.

You may also want to try:

- do random walk of N steps, storing each location x[n] at step number n.

- sort all x[n]

- for maximum, take sorted list entry at index floor(0.95*N)

- for minimum, take sorted list entry at index floor(0.05*N)

Notation:

**x[n]**is location at step number n, assuming start position

**x[0]=0**.

Adjust the (0.05, 0.95) constants to taste.

Similar story for the mean value. Since you sorted that list already, you might as well take the median, so x[ floor(N/2) ].

PS: request from those of us who do find this sort of thing interesting, but are a but strapped for time... I did not read the entire thread today, so I'm sorry if I missed the context that would have made it obvious... But: for walk_example_1 and walk_example_2, I couldn't get the information of what it was. I.e, is this a single trial of N=1E6 steps. (yes). Or is this the sum of all M=1E3 trial runs. (No). To be sure it was a single trial the image filenames actually were more informative. That and eyeballing the number of bins ~ 50. And eyeballing the area of the histograms .... "mmmh, if I put this blob here and that blob there I get an about level line around the count of ... 20000. Okay. About 50 * about 20000 equals about 1E6. Check, it is a single trial. Or you could just put that information in the plot title. Just a suggestion. I am as guilty of forgetting to do this as the next person. Reason I started doing proper annotation, titles and whatnot even in my own projects that never see the light of day: yeeeaaaars from now my future self will thank my current self for making it easy to follow what the hell I was doing at the time.

Oh yeah, random other note: (PPS?

) If you want to solve for the expectation value of the (min,max) values of a random walk you can use the infinity-norm of the x-vector, where again x[0] is start, and X[N] is end position. So in this case x is an (N+1) dimensional vector. max(x) == inf-norm(x). Using that you can solve for min,max analytically. Or do it the proper aka lazy way and just solve for max, then do some handwaving and claim symmetry relation between min & max.

Something similar can be done for the (0.05*N, 0.95*N) values, but that might get too involved for a quick experiment. If interested, lookup "order statistics".

Related linkies:

https://en.wikipedia.org/wiki/Norm_(mathematics)#Maximum_norm_(special_case_of:_infinity_norm,_uniform_norm,_or_supremum_norm)

https://en.wikipedia.org/wiki/Order_statistic