Question: Use Mathmatica to solve the question. Please take a picture or type down the code. Do not use Matlab We have solved this problem before
Use Mathmatica to solve the question. Please take a picture or type down the code. Do not use Matlab
We have solved this problem before in Matlab. A random walk is represented by a vector beginning with 0 and where each subsequent entry in the vector is attained from the previous entry by adding a random choice of either 1 or -1 ( each choices with 0.5 probability ). For this homework, our random walks will always continue until we reach an entry of absolute value 10. 1. Make a list v containing the lengths of 5,000 different random walks, each of which ends when it reaches an entry of absolute value 10. 2. Define a variable v_min which is the minimum value in v. 3. Define a variable "v_max" which is the maximum value in v. 4. Define a variable "v_mean which is the mean value of the elements in v, rounded to the nearest integer. 5. Define a variable "v_median which is the median value of the elements in v. 6. Plot a histogram of the elements in v. We have solved this problem before in Matlab. A random walk is represented by a vector beginning with 0 and where each subsequent entry in the vector is attained from the previous entry by adding a random choice of either 1 or -1 ( each choices with 0.5 probability ). For this homework, our random walks will always continue until we reach an entry of absolute value 10. 1. Make a list v containing the lengths of 5,000 different random walks, each of which ends when it reaches an entry of absolute value 10. 2. Define a variable v_min which is the minimum value in v. 3. Define a variable "v_max" which is the maximum value in v. 4. Define a variable "v_mean which is the mean value of the elements in v, rounded to the nearest integer. 5. Define a variable "v_median which is the median value of the elements in v. 6. Plot a histogram of the elements in v
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
