A random walk is a random path most often represented as a random number that changes over time. In particular, one common random walk is that in which the starting state is 0 and in each iteration we either add 1 or subtract 1 from the current value with equal probability. That is, in the first step, the next value would be 1 with probability 0.5 and -1 with probability 0.5. Use R to generate a random walk with 100 values starting at value 0 and store the values in a vector called random_walk. This vector should have length 100.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter17: Markov Chains
Section: Chapter Questions
Problem 12RP
icon
Related questions
Question

A random walk is a random path most often represented as a random number that changes over time. In particular, one common random walk is that in which the starting state is 0 and in each iteration we either add 1 or subtract 1 from the current value with equal probability. That is, in the first step, the next value would be 1 with probability 0.5 and -1 with probability 0.5. Use R to generate a random walk with 100 values starting at value 0 and store the values in a vector called random_walk. This vector should have length 100.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning