Let us start by unwrapping the meaning of these words in the context of statistics:
- **Stochastic:** of a random nature.
- **Process:** a collection of variables indexed by some space.
We may now define a **stochastic process** as a collection of random variables defined on the same probability space $P$ and indexable by some space $T$. To put it simply, it is a *distribution over functions*.
>[!info] Examples
>- **Wiener process:** the movement of a particle in a fluid (Brownian motion), indexed by a time step.
>- **Bernoulli process:** a sequence of coin flips, indexed by a flip number.
One *realization* of this process is therefore one *function sample*. It may help to interpret a stochastic process as a finite-dimensional multivariate distribution, such that a function sample is a *random vector* composed of $n$ *random variables*:
$
X =
\begin{bmatrix}
X_1\\X_2\\\cdots\\X_n
\end{bmatrix} =
\begin{bmatrix}
f(x_1) \\ f(x_2) \\ \cdots \\ f(x_n)
\end{bmatrix}
$
This approach makes it easy to implement in practice. By indexing into the random vector $X$ with our index $i \in T$, we can access each random variable $X_i$ from the same realization. Not quite clear? Let's look at an easy example!
### The coin flip example
Let's take the coin flips sequence as a **Bernoulli process**: this stochastic process represents a sequence of $n$ consecutive i.i.d. coin flips originating from the following Bernoulli distribution:
![[SP bernoulli.svg|Bernoulli distribution for a coin flip.]]
where $0$ is head and $1$ is tail. Now let's consider the **Bernoulli process** where we flip 3 coins in a row: each realization is a $3-$dimensional random vector $X$ indexed by $i \in \{1,2,3\}$, such as: $X_1=\begin{bmatrix}0\\0\\1\end{bmatrix}$ or $X_2=\begin{bmatrix}1\\0\\1\end{bmatrix}$.
Each sequence of coin flips may be seen as a discontinuous function, all originating from the same stochastic process, or multivariate Bernoulli distribution:
![[SP mv bernoulli.svg|Coin flip stochastic process as a multivariate Bernoulli distribution.]]
The graph shows the two realizations: $X_1$ in green and $X_2$ in orange.
Each random variable from the random vectors is a point sampled from the same Bernoulli distribution. Note that their continuous function equivalents $f_1$ and $f_2$ were added to better understand the concept of *distribution over functions*, even though the functions are truly discontinuous in this case and simply amount to 3 points. Here, the $X-$axis represents the indexing space $T$ and the $Y-$axis is simply the coin state.
Hopefully, this example offers an intuitive visual explanation of what a stochastic process is, and you are now ready to go further.