Question: Question 3 - Simulating a Random Walk Consider the following random process: You start at point zero and take a number of steps. Each step
Question 3 - Simulating a Random Walk
Consider the following random process:
You start at point zero and take a number of steps. Each step is equally likely to be a step forward (+1) or a step backwards (-1).
For a given number of steps:
- What is the expected distance from the starting point?
- What is the standard deviation of the distance from the starting point?
Required
- Build a model to simulate a random walk with N steps
- For example, the 6-step random walk could look like the following
| Step Number | Step | Distance Travelled |
|
|
| 0 |
| 1 | 1 | 1 |
| 2 | 1 | 2 |
| 3 | 1 | 3 |
| 4 | -1 | 2 |
| 5 | -1 | 1 |
| 6 | 1 | 2 |
- Apply this model a large number of times and in each case measure the distance travelled (the total distance can be negative as well as positive). Use this measurement to estimate 1) the average distance from the starting point after N steps and 2) the variance or standard deviation of the distance from the origin after N steps.
- Implement this model in Excel, VBA, MATLAB, R or Python. Supply a working version of the model plus a document explaining how you implemented the model and what conclusions you can draw from applying the model.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
