Introduction

An example of a continuous random variable is the displacement from the origin of a one-dimensional
random walker that steps at random to the right with
probability p, but with a step length that is chosen at *random*
between zero and the maximum step length a. The continuous
nature of the step length means that the displacement x of
the walker is a continuous variable.

We can record the number of times H(x) that the displacement of the walker from the origin after N steps is in a bin of width Δx between x and x + Δx. If the number of walkers that is sampled is sufficiently large, we would find that H(x) is proportional to the estimated probability that a walker is in a bin of width Δx a distance x from the origin after N steps. To obtain the probability, we divide H(x) by the total number of walkers.

In practice, the choice of the bin width is a compromise. If Δx is too big, the features of the histogram would be lost. If Δx is too small, many of the bins would be empty for a given number of walkers, and our estimate of the number of walkers in each bin would be less accurate.

Problems

- Describe the qualitative features of the histogram for the displacement x after N steps. Does the qualitative features of the histogram change as the number of walkers is increased?
- How does the variance depend on N for fixed p?
- The simulation uses a step length with a uniform probability between 0 and 1. Calculate analytically the mean displacement and the variance for one step. (Remember that a step can be either to the left or the right and is of variable length.) Compare your analytical result to the result of the simulation for N = 1.
- How does the variance found in the simulation after N steps compare to the variance for one step?
- Explore the dependence of the histogram on the bin width. What is a reasonable choice of the bin width for N = 100?

References

- Harvey Gould and Jan Tobochnik,
*Thermal and Statistical Physics,*Chapter 3.

Java Classes

- VariableStepLengthWalkApp

Updated 18 March 2007.