First I approached the problem by defining the step size and the direction of the steps and assigning it to a
variable. I used arrays to create the data for further use. I have calculated PDF by using the built-in Kernel
Density function in the numpy library. Once assured by seeing the output values I plotted the Probability
density vs position curve for a single case.
Then I simulated the case of different population sizes and plotted them. I was very happy to see that they
actually behave the same for various population sizes.
Then I varied the step numbers keeping the population size intact. Immediately I saw that the FWHM
increased as well as the maximum probability decreased with the increasing step numbers.
Then I multiplied the probability density with the square root of step numbers. The peak of the
dimensionless pdf vs positions merged nearly at the same point.
Lastly I divided the position by the square root of step numbers and the plot showed that all the curves
merge in one curve.
The log(maximum probability) vs log(times) curve exactly shows a straight line with slope -½ as you said in
class.
I, being motivated by the image shown in your class, tried to make a visualization of the random walks in a
graph by showing every step of each person. That also showed up like a Gaussian distribution.
Codes: All the codes are stored in this Google Drive link as a Google Colaboratory file.
https://colab.research.google.com/drive/1pyUZ5UIsP7ZZcPef5s5r4o3_VB34XixU?usp=sharing
Acknowledgement: I got a lot of help from Proshanto. Also, I took a little help from chatgpt to draw the
colorful graphs and for labeling.