- #1
jamie.j1989
- 79
- 0
Hi, I'm trying to work out how many time a particle going on a random walk starting at the origin would pass a particular point or points for a given total number of steps. I've simulated the problem and get approximately the same answer every time, however I'm struggling to know where to even start trying to work the number out analytically.
Problem
If two points lie on the x-axis at points s and -s and a particle starting at the origin goes on a random walk with step size b for a total of N steps, what is the average number of times it crosses s or -s?
For the problem simulated I used s = 7 , b = 1, N = 1000
I ran the simulation 30000 times and the number I got was 37.6310, I did this by simply creating a random number between 0 and 1 if the number is > 0.5 walk left < 0.5 walk right, and incremented a counting variable every time it crossed s or -s, and then averaged over the 30000 runs.
Thanks
Jamie
Problem
If two points lie on the x-axis at points s and -s and a particle starting at the origin goes on a random walk with step size b for a total of N steps, what is the average number of times it crosses s or -s?
For the problem simulated I used s = 7 , b = 1, N = 1000
I ran the simulation 30000 times and the number I got was 37.6310, I did this by simply creating a random number between 0 and 1 if the number is > 0.5 walk left < 0.5 walk right, and incremented a counting variable every time it crossed s or -s, and then averaged over the 30000 runs.
Thanks
Jamie