I would like to know how to plot 1000 "walkers" that each "walk" 100 steps.
I am not sure how to plot a diagram with more then one walker, let alone 1000 each walking 100 steps.
Below is the code for one "walker" walking 10 steps.
function walk(N, init::Int=0)
trace = Int[init]
for t in 1:N
if randn() > 0
push!(trace, trace[end] + 1)
else
push!(trace, trace[end] - 1)
end
end
trace
end
walk(10)
[0, 1, 0, 1, 0, -1, 0, 1, 2, 3, 2]