Chapter 9: Problem 12
A random walk is a particular kind of probabilistic simulation that models certain statistical systems such as the Brownian motion of molecules. You can think of a one-dimensional random walk in terms of coin flipping. Suppose you are standing on a very long straight sidewalk that extends both in front of and behind you. You flip a coin. If it comes up heads, you take a step forward; tails means to take a step backward. Suppose you take a random walk of \(n\) steps. On average, how many steps away from the starting point will you end up? Write a program to help you investigate this question.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.