# Random Process, how do I understand this?

I think I have little difficulty in understanding the "Random Process". Here is a definition taken from Oppenheim's book.

In Section 7.3 we deﬁned a random variable X as a function that maps each outcome of a probabilistic experiment to a real number. In a similar manner, a real-valued CT or DT random process, X(t) or X[n] respectively, is a function that maps each outcome of a probabilistic experiment to a real CT or DT signal respectively,
termed the realization of the random process in that experiment. For any ﬁxed time instant t = t0 or n = n0, the quantities X(t0) and X[n0] are just random variables. The collection of signals that can be produced by the random process is referred to as the ensemble of signals in the random process.

So, in other word, can I say that, $X(t)$ (for $0<=t<=T)$ is just a collection of random variables that $X(0)$ is a single random variables, and $X(1)$ is another random variable? And could I say that, each $X(t_0)$ (where $t_o$ is just a number)is a sample taken from the PDF of $X$, and that each $X(t_o)$ is a realization of the random process?

I also have trouble trying to match it up with the matlab example, in which we run the 'normrand' command.

R = normrnd(mu,sigma,m,n,...)


For instance, if I run

n2 = normrnd(0,1,[1 5])
n2 =
0.0591  1.7971  0.2641  0.8717  -1.4462


Can I say that n2 is just a random process that each element of n2 array, n2[1], n2[2], n2[3], n2[4], n2[5], they are just samples taken from the normal gaussian distribution, and here, we are having 5 realizations of this gaussian process?

Assume you have a measurable space $(\Omega, \mathscr{F})$. Then, as you mentioned, a random variable is a measurable function:

$$X: \Omega \to \mathbb R$$

On the other hand, a stochastic process, maps $\Omega$ to a function space. For example, the space of continuous functions on $[0,1]$, namely $C[0,1]$. So $X$ would be a function:

$$X: \Omega \to C[0,1]$$

In other words, for $\omega \in \Omega$, $X(\omega)$ is a continuous function in $[0,1]$. Now, for fixed $t_0 \in [0,1]$, define the projection

$$\pi_{t_0}: C[0,1] \to \mathbb R, \pi_{t_0}(f) = f(t_0)$$

Then for each $t_0$, you get a new random variable $X_{t_0}: \Omega \to \mathbb R$ defined as $X_{t_0}(\omega) = \pi_{t_0}(X(\omega)) = X(\omega)(t_0)$.

In other words your first statement is correct, $(X_t, t \in [0,1])$ is a family of random variables and e.g. $X_1$ is a single random variable. Notice that I have tried to separate the way I write the index, because I think this might have caused your confusion in part. Often you will see a stochastic process written as a function $\Omega \times [0,1] \to \mathbb R$, but for me it is more intuitive to think of a realization of the stochastic process as just being a function.

So to answer your other questions: $X_{t_0}$ is not a realization of the stochastic process, it is the projection of the stochastic process, and it is a random variable. Also $X_{t_0}$ is not a sample taken from the pdf of $X$. Indeed, if we also attach a measure on the measurable space $(\Omega,\mathscr{F})$, then $X$ defines a measure on $C[0,1]$, while the random variable $X_{t_0}$ defines a measure on $\mathbb R$.

Similarly, a discrete stochastic process would map e.g. $\Omega \to \mathbb R^{\mathbb N}$, where $\mathbb R^{\mathbb N}$ is the set of all functions $f: \mathbb N \to \mathbb R$.

In regards to your Matlab example, the usual interpretation given to that is that you have drawn 5 independent samples from a normal distribution, i.e. 5 realizations of the random variable. On the other hand, if you define $A = \{1,2,3,4,5\}$, then you could say that you have a random process:

$X: \Omega \to \mathbb R^A$ ($\mathbb R^A$ is the set of functions $f: A \to \mathbb R$). $n_2$ then is just one realization of this random process (not five!), but if you project this process you indeed get 5 normally distributed random variables. Thus e.g. $n_2[1]$ can be interpreted in the following 2 ways:

1) It is the realization of the random variable $X_1$, i.e. of this projection of the random process, i.e. $X_1(\omega) = n_2[1]$.

2) The realization of the random process yields a function $n_2:A \to \mathbb R$, in other words $X(\omega) = n_2$. And $n_2[1]$ is then just the value this function takes when evaluated at 1.