This solution for choosing the next step isn't unique but it is the simplest in my opinion.
I have used 100000 paths for each N.
The average should be zero because this simulation chooses each step depending from the very first step of the path and that is always 50% left or right so the average over many paths should be zero.

No comments:
Post a Comment