Part 1 - Introduction to Stochastic Processes

Introduction to Stochastic Processes

In this part, we will define what a stochastic process. We will further recap some basic probability theory concepts that are essential for understanding stochastic processes.

Stochastic vs Deterministic Processes
Stochastic vs Deterministic Processes

In Figure 1, we can see that some models make exact predictions (deterministic processes), while others provide predictions with uncertainty (stochastic processes). In most cases, it is more realistic to model systems as stochastic processes, as they often involve inherent randomness and uncertainty.

Note

We will use the terminology stochastic models and probabilistic models interchangeably.

Definition 1 (Stochastic Process)

A stochastic process is a collection of random variables, {Xt,tI}\{X_t, t \in \mathcal{I} \}.

The set I\mathcal{I} is the index set of the process. I\mathcal{I} most often represents a set of specific times.

The random variables XtX_t are defined on a common state space S\mathcal{S}. This set represents the possible values the random variables XtX_t can take.

Finally, these sets can be discrete or continuous and simple (e.g., I={1,2,3}\mathcal{I} = \{1, 2, 3\}) or more complex (e.g., vectors of real numbers).

Motivation for Probabilistic Models

One thing we need to consider is, what do we want to do with these models? What is the point? While it is an open question, a easy answer is that we want to set up a model, based on some general knowledge, and make new predictions from the model.

  1. You have data.
  2. You want to find a model so that the data could reasonably be produced by the model.
  3. You want to use this model for predictions of future observations.

Using data in this way is called (statistical) inference.

Definition 2 (Frequentist VS. Bayesian Inference)

There are two main paradigms for statistical inference: frequentist inference and Bayesian inference.

In classical (frequentist) inference,

  1. We use contextual knowledge to find a model with some unknown parameters. The model relates observed data to future predictions.

  2. Find an estimate for the parameters, using estimators that have desirable properties.

  3. Plug the estimates into the model and make predictions.

In Bayesian inference,

  1. We use contextual knowledge to find a model with some uncertain parameters. The model relates observed data to future predictions.

  2. Find the conditional probability for future predictions given the value of the observed data.

The Markov Property

Definition 3 (Markov Property)

A process fulfills the Markov property if, for any t0It_0 \in \mathcal{I}, whenever Xt0X_{t_0} is known, XtX_t (with t>t0t > t_0) is independent of the values for XsX_s for all s<t0s < t_0.

Note

Most of the stochastic processes that we will deal with will have the Markov property.

Probability Theory Recap

Intuition (Random Variable)

A random variable is a variable which has possible values in some state space S\mathcal{S}, together with probabilities assigned to values and sets of values in the state space.

We separate between discrete and continuous random variables.

For discrete random variables, we assign a probability to each single value in the state space.

For continuous random variables, we assign probabilities to intervals of values in the state space.

Definition 4 (Measurable Subsets)

It turns out to be impossible to define a concept with reasonable properties that assigns a “size” to all subsets of for example RN\mathbb{R}^N. Instead, we need to restrict the concept of “size” to “measurable” sets.

Let SS be any set. A sigma-algebra Ω\Omega on SS is a set of subsets of SS such that,

  1. Ω\Omega includes SS.

  2. If AΩA \in \Omega, then the complement AcSAA^c \coloneqq S \setminus A is also in Ω\Omega.

  3. If A1,A2,ΩA_1, A_2, \ldots \in \Omega, then the union i=1Ai\bigcup_{i=1}^{\infty} A_i is also in Ω\Omega.

Measurable sets are those that are in an appropriately defined sigma-algebra.

Note

In RN\mathbb{R}^N, one generally uses the Borel subsets [^1]

What is most important, when SS is finite or countable, all subsets will be measurable. When SS is some interval of real numbers, there will exist subsets that are not measurable, but we will not be concerned with those.

Definition 5 (Probability Measure and Random Variables)

A probability (measure) is a real function P()P(\cdot) defined on the measureable subsets ASA \subseteq S, satisfying,

  1. 0P(A)10 \leq P(A) \leq 1 for all measurable subsets ASA \subseteq S.

  2. P(S)=1P(S) = 1.

  3. For any countable collection of disjoint measurable subsets A1,A2,A_1, A_2, \ldots, we have P(i=1Ai)=i=1P(Ai)P\left( \bigcup_{i=1}^{\infty} A_i \right) = \sum_{i=1}^{\infty} P(A_i).

These are called the Kolmogorov axioms for probability [^2].

Measurable subsets SS are called events, and P(S)P(S) is the probability of the event SS occurring.

Thus, a random variable XX with state space S\mathcal{S} is a real-valued (measurable) function on SS together with a probability measure P()P(\cdot) defined on the measurable subsets of S\mathcal{S}.

Recall (Conditional Probability and Independence)

Given the events AA and BB, the conditional probability of AA given BB is defined as,

P(AB)=P(AB)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

The events AA and BB are independent if P(AB)=P(A)P(B)P(A \cap B) = P(A) P(B), or equivalently, if P(AB)=P(A)P(A \mid B) = P(A).

The law of total probability states that if B1,B2,,BnB_1, B_2, \ldots, B_n is a sequence of events that partitions S. Then,

P(A)=i=1nP(ABi)=i=1nP(ABi)P(Bi)P(A) = \sum_{i=1}^{n} P(A \cap B_i) = \sum_{i=1}^{n} P(A \mid B_i) P(B_i)

Thus, Bayes’ law follow directly from the definition of conditional probability and the law of total probability,

P(BA)=P(AB)P(B)P(A)P(B \mid A) = \frac{P(A \mid B) P(B)}{P(A)}
Notation (The generic   π\pi-notation)

We will use the generic π\pi-notation as a shorthand. We write π(x)\pi(x) for P(X=x)P(X = x), π(x,y)\pi(x, y) for P(X=x,Y=y)P(X = x, Y = y), and π(xy)\pi(x \mid y) for P(X=xY=y)P(X = x \mid Y = y).

Definition 6 (Conditional Densities for Continuous Distributions)

For a continuous random variable XX, we will write its density function as π(x)\pi(x), extending the generic π\pi-notation. If we have a joint distribution for continuous random variables XX and YY, we write the joint density as π(x,y)\pi(x, y).

Thus, we get formulas like,

π(x) dx=1andπ(x,y) dy=π(x)\int \pi(x) \ dx = 1 \quad \text{and} \quad \int \pi(x, y) \ dy = \pi(x)

We can define the conditional density as,

π(xy)=π(x,y)π(y)\pi(x \mid y) = \frac{\pi(x, y)}{\pi(y)}
Recall (Expectation and Conditional Expectation)

Recall, the expectation of a discrete random variable is,

E[Y]=yy π(y)\mathbb{E}[Y] = \sum_{y} y \ \pi(y)

and of a continuous random variable is,

E[Y]=y π(y) dy\mathbb{E}[Y] = \int y \ \pi(y) \ dy

The conditional expectation in the discrete case is,

E[YX=x]=yy π(yx)\mathbb{E}[Y \mid X = x] = \sum_{y} y \ \pi(y \mid x)

and in the continuous case is,

E[YX=x]=y π(yx) dy\mathbb{E}[Y \mid X = x] = \int y \ \pi(y \mid x) \ dy
Definition 7 (Law of Total Expectation)

If XX is a discrete random variable, we get that,

E[Y]=xE[YX=x] π(x)\mathbb{E}[Y] = \sum_{x} \mathbb{E}[Y \mid X = x] \ \pi(x)

If XX is a continuous random variable, we get that,

E[Y]=E[YX=x] π(x) dx\mathbb{E}[Y] = \int \mathbb{E}[Y \mid X = x] \ \pi(x) \ dx

In both cases, this can be written as,

E[Y]=E[E[YX]]\mathbb{E}[Y] = \mathbb{E}[\mathbb{E}[Y \mid X]]
Definition 8 (Law of Total Variance)

Recall that, by definition,

Var(Y)E[(YE[Y])2]=E[Y2](E[Y])2\mathrm{Var}(Y) \coloneqq \mathbb{E}\left[(Y - \mathbb{E}[Y])^2\right] = \mathbb{E}[Y^2] - (\mathbb{E}[Y])^2

Similarly, we have for the conditional variance,

Var(YX)EYX=x[(YE[YX])2X]\mathrm{Var}(Y \mid X) \coloneqq \mathbb{E}_{Y \mid X = x}\left[(Y - \mathbb{E}[Y \mid X])^2 \mid X\right]

With these definitions, we can state the law of total variance as,

Var(Y)=E[Var(YX)]+Var(E[YX])\mathrm{Var}(Y) = \mathbb{E}[\mathrm{Var}(Y \mid X)] + \mathrm{Var}(\mathbb{E}[Y \mid X])