import numpy as np
import matplotlib.pyplot as plt
nsteps=1000
draws=np.random.normal(loc=0,scale=1,size=nsteps)
steps=np.where(draws>0,1,-1)
walk=steps.cumsum()
plt.title("Random Walk(noraml)")
plt.plot(walk,color='blue')
plt.show()
01-03
1015
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-13
12-05
3199
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)