logo

What is a Stochastic Process? 📂Probability Theory

What is a Stochastic Process?

Definition

  1. The range of the random variable $X: \Omega \to E$ is called the state space.
  2. The set of random variables $\left\{ X_{t} \mid t \in [ 0 , \infty ) \right\}$ is called a continuous stochastic process.
  3. The sequence of random variables $\left\{ X_{n} \mid n = 0, 1, 2, \cdots \right\}$ is called a discrete stochastic process.

Explanation

The term ‘process’ in stochastic process often makes the concept difficult to understand because it doesn’t quite match the initial definition of a ‘process’ as we commonly understand it in terms of algorithms or sequences of actions. The reason why it’s specifically described as a ‘sequence of random variables’ or ‘a set of random variables’ is because, after graduating high school, a sequence is defined as a ‘function whose domain is the set of natural numbers’.

Function? Sequence? Set?

In this sense, a stochastic process is essentially ‘a function that maps random variables to a temporal variable $t$ or $n$. What really matters is ‘when and how does the probability occur?’, there’s no need to overcomplicate thinking in terms of sets or sequences. People are curious about the probability of it raining today, but they are also interested in the probability of rainfall tomorrow and the day after tomorrow. If we can designate $p ( X_{n} = \text{ rain } )$ as the probability of rain on D+n, where today is D+0, tomorrow is D+1, and the day after tomorrow is D+2, then you’ve perfectly understood the concept of stochastic processes.

The study of stochastic processes can be learned at various levels across many majors, and the terminology can vary from one textbook to another. When first getting into the field of stochastic information theory, it’s more important to grasp intuitive concepts than to get hung up on precise definitions.

Examples

Gambling

Take the Coin Toss GameCash Process, for example. In this game, you toss a coin and gain $1$ points for heads and lose $1$ points for tails. The game ends when the player decides to stop, and if the final score is positive, the player receives a thousand Won per point; if negative, the player owes a thousand Won per point. The score starts at $0$ points.

First, the state space of this game is the set of integers $\left\{ \cdots, (- 2) , (-1) , 0 , 1 , 2 , \cdots \right\}$, which represents the player’s score. When the player has tossed the coin $n$ times, the probability that the score is $x$ points is represented by $p( X_{n} = x)$. Especially, if the coin has not been tossed at all, the score is certain to be $0$ points, meaning $p ( X_{0} = 0 ) = 1$ can be stated with certainty.

Here, $X_{1}$ is either $(-1)$ or $1$, just as $X_{2}$ is one of the three $(-2) , 0 , 2$. As the number of trials $n$ changes, the random variable $X_{n}$ changes too.

10.png 1000.png Simulating the above game demonstrates how the scores fluctuate randomly, a phenomenon known as Brownian Motion. If one had quit after $10$ rounds, they would have won two thousand Won, but quitting around $400$ rounds would have resulted in a significant loss, and quitting around $900$ rounds would have led to a substantial win.

Study of stochastic processes can also provide answers to ‘when is the best time to quit?’. Everyone wonders about when the next opportunity will come or how much risk they’re taking, especially if they achieved a reasonable goal and are tempted to try their luck further.

Stocks

Another example is the stock market.

20190121\_113540.png Of course, stock movements are not entirely random. However, predicting the trend a year from now by looking at charts like the above is incredibly difficult. Studying stochastic processes is not about becoming a chartist but rather the opposite. Understanding what affects price fluctuations, quickly acquiring information, and creating accurate models can guarantee a worry-free life if kept personal (though, of course, this is impossible).

Mathematically, stochastic processes can also be viewed as nondeterministic dynamical systems.

Code

Below is an example code for simulating the cash process using R.

set.seed(150421)
toss<-sample(c(-1,1),10,replace=T)
win.graph(4,4)
plot(cumsum(toss),type='l',main='10회 반복')
abline(h=0)
 
toss<-sample(c(-1,1),1000,replace=T)
win.graph(4,4)
plot(cumsum(toss),type='l',main='1000회 반복')
abline(h=0)