Description
In this lab we are going to simulate some variants of the random walk problem that we have discussed in the lecture.
-
(Warm up) Implement the 1D unbiased and biased random walk.
-
-
For each plot and show how the average distance of the random walker changes in time.
-
-
-
For each of them plot and show how the variance of the random walker depends on time.
-
-
-
Plot the histogram of the probability distribution of the random walker to be at a site. What is the distribution. Do you think that it is stationary and how do you ensure it?
-
-
(2D random walk) For this part you should refer to module 9.5 of the book. My suggestion is also to follow the documentation in the book for proper code development.
-
-
Using the pseudo-code randomWalkPoints develop the 2D random walk code with parameter n, for the number of steps.
-
-
-
By referring to animateWalk animate your random walk. This kind of visualization technique is extremely important while conducting simulations of the kind we are doing here.
-
-
-
Plot the average travelled versus number of steps. Plot it in a way to clearly show the dependence of the average distance travelled on the number of steps.
-
-
-
Modify your code for problem 8 in the Projects section. Based on the understanding developed note the key observations and provide your explanation.
-