A random walk (first introduced by Karl Pearson in 1905) is a mathematical formalization of a path consisting of a series of random steps.

#### Random Walks Example

The following are some example related to random walks

- The path traced by a molecule as it travels in a liquid or gas,
- The search path of a foraging animal,
- The price of a fluctuating stock, and (iv) the financial status of a gambler.

All these random steps in the example can be modeled as random walks, although they may not be truly random in reality.

Suppose there are $a+1$ positions marked out on a straight line and numbered 0,1,2,…, a. A person starts at $k$ where $0<k<a$. The walk proceeds in such a way that, at each step, there is probability *p* that the walker goes forward one step to $k+1$ and a probability $q=1-p$ that the walker goes back one step to $k-1$. The walk continues until either $0$ or $a$ is reached and then ends.

In a random walk, the position of a walker after having moved $n$ times is known as the state of the walk after $n$ steps or after covering $n$ stages. Thus the walk described above starts at stage $k$ at step $0$ and moves to either stage $k-1$ or stage $k+1$ after 1 step and so on.

If the walk is bounded, then the ends of the walk are known as barriers and they may have various properties. In this case, the barriers are said to be absorbing implying that the walk must end once a barrier is reached since there is no escape.

A useful diagrammatic way of representing random walk is by a transition or process diagram. In a transition diagram, the possible states of the walker can be represented by points on a line. If a transition between two points can occur in one step then those points are joined by a curve or edge as shown with an arrow indicating the direction of the walk and a weighting denoting the probability of the step occurring. A transition diagram is also known as a direct graph.

For small Markov processes the simplest way to represent the process is often in terms of its state transition diagram. In-state transition diagram each state (outcome) represents the process as a node in a graph. The arcs in the graph represent possible transitions between states of the process. The arcs are labeled by the transition rates between the states.

**Example: ** Suppose a meteorologist notices that the weather on a given day seems to depend on the weather conditions of the previous day. He/ She observes that if it is raining one day, then the next day is sunny 60% of the time and rainy 40% of the time; on the other hand, if it is sunny, the next day is sunny with probability 30% and rainy with probability 70%. Note that there are two outcomes (i) sunny and (ii) rainy in this Markov process.

The transition probability between sunny and rainy is 70%, between sunny and sunny is 30%, between rainy and sunny is 60%, and between rainy and rainy is 40%. The simple weather forecasting Markov Process in the transition diagram is

Random walk models are widely used in many fields such as Ecology, Economics, Psychology, Computer Science, Physics, Chemistry, Biology, etc. Random walks explain the observed behavior of processes in all these fields, serving as a fundamental model for the recorded stochastic activity.

Overall, the random walk model is a versatile tool within stochastic processes. It provides a framework for studying systems influenced by randomness and helps understand the evolution of such systems over time.

Learning Statistics by Using R Programming Language

Try this

http://www.math.cornell.edu/~mec/Winter2009/Thompson/randomwalks.html