Question: 4. Simulate a discrete random walk in 22 atarting at the origin and movirig north with probability p1 (we the instructions at the top of
4. Simulate a discrete random walk in 22 atarting at the origin and movirig north with probability p1 (we the instructions at the top of this document), south with p=p2. eust with p in pe pest with p=p4. For your random walk, (a) Plot 5 realisations of your walk with 2500 steps on the same plot (it may be wise to use different colours for each random walk). (b) Calculate the expected length of the walk after 2500 steps (i.e. the distance travelled from the starting point). (You will need to run muny wallss to get an accurate estimate, experiment with the number of walks until you get a mumber that gives a sufficiently stable expectation value. You can also choose whatever distance measure you wish]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
