0% found this document useful (0 votes)
13 views4 pages

Random Walk - Merged Output

The document outlines a series of steps taken to analyze probability density functions (PDF) using numpy, including simulations of different population sizes and varying step numbers. It describes how the behavior of the PDF changes with these variations and concludes with visualizations that demonstrate a Gaussian distribution. The author acknowledges assistance received during the process and provides a link to the code used in the analysis.

Uploaded by

Anindya Biswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Random Walk - Merged Output

The document outlines a series of steps taken to analyze probability density functions (PDF) using numpy, including simulations of different population sizes and varying step numbers. It describes how the behavior of the PDF changes with these variations and concludes with visualizations that demonstrate a Gaussian distribution. The author acknowledges assistance received during the process and provides a link to the code used in the analysis.

Uploaded by

Anindya Biswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

 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.

You might also like