One-Dimensional Random Walk
In a one-dimensional random walk, an object starts at a fixed position (usually the origin,
\( x = 0 \)). At each time step, it takes a step of fixed size (often taken as 1 unit) in either
the positive or negative direction. The step direction is determined randomly, with equal
probability for each direction.
Mathematically, at each time step \( t \), the position \( X(t) \) can be expressed as:
\[
X(t) = X(t-1) + S(t)
\]
where \( S(t) \) is a random variable that takes the value +1 or -1 with equal probability
(i.e.,
\( P(S(t) = +1) = 0.5 \) and
\( P(S(t) = -1) = 0.5 \)).
Number of Walks:
In this simulation, \( N = 10,000 \) random walks are generated. Each random walk consists
of \( T = 1,000 \) time steps, which allows for a large dataset to analyze the properties of
the random walk statistically.
Cumulative Position Calculation:
The cumulative position of the walker after each step can be computed using the cumulative
sum of the steps taken. This gives a time series of positions for each random walk.
Root Mean Square (RMS) of Positions
The root mean square (RMS) is a statistical measure used to quantify the magnitude of a
varying quantity. It provides an average value that takes into account the variability of the data.
For a set of values \( x_1, x_2, \ldots, x_T \), the RMS is calculated as:
\[
R_{\text{rms}} = \sqrt{\frac{1}{T} \sum_{i=1}^{T} x_i^2}
\]