stochastic process: how can probability space be the same? It is said that stochastic process is just a family of random variables $X(\omega)$ supplied with parameter $t$, which means that for different values of $t$ we have different functions of $\omega$, $X_t(\omega)$, but all of them are defined on the same sample space $\Omega$. But how is that possible? Let us say we have random walk with discrete time
$$X_n = Z_1 + Z_2 + ... + Z_n$$
where each $Z_i$ is defined as a function of random experiment $\omega \in \Omega = \{H, T\}$. Thus for $X_1 = Z_1$ we have event space $\Omega$ with just 2 elements. For $X_2 = Z_1+Z_2$ we have events which are pairs $(\omega_1, \omega_2)$ with 4 possible outcomes, thus $X_2$ is a function $X_2(\omega_1,\omega_2)$, and so on. Thus for each $n$ we have different event space with the size which grows as $2^n$.
What am I doing wrong? Should we construct the sample space some other way? May be we should say from the beginning that sample space is just an infinite sequence of head-tail experiments
$$\Omega = \{ (\omega_1, \omega_2, ...) : \omega_i \in \{H, T\}\}$$
and than say that
$$X_n = X_n(\omega_1, \omega_2, ...)$$
?
 A: "What am I doing wrong"?
Answering that first, what you're doing wrong is changing your source of randomness to fit the random variable in question. You shouldn't do that. In experiment design, the way things work is as follows :

*

*You decide what random variables (I don't mean this in a rigorous sense, more like a heuristic sense e.g. knowing that you want to perform $7$ coin flips or perform the simple symmetric random walk) are in play , and you decide what events are of interest. (e.g. knowing where you are after $2916$ step in a random walk, for example).


*You design a probability space that covers your entire experiment : make sure that your random variables fit, and that your sigma-algebra captures all events of interest.
That's the order. The one-line mantra here is the following :

Your sample space needs to contain enough elements so that all possible randomness in your experiment is captured, and enough events so that everything you want to study about the process is captured by the events.

What you're doing wrong is not fixing your probability space at first. Continuously expanding it to fit various difficulties in your study will create the simple problem that you will not be able to model interactions between them. For example, if $X_1,X_2$ are random variables on different probability spaces, then $X_1+X_2$ doesn't make sense as a function!

An example to illustrate an unsuitable sample space for an experiment
This post is very helpful in understanding the word "richness", which is an (non-mathematical) adjective used to describe how much randomness a probability space can accommodate.
So coming back to your experiment, you decide your random variables, and find a probability space rich enough to accommodate them. You should probably try the following exercise from that particular post (which I'll phrase in simpler language) :

On the probability space $\Omega = \{0,1\}, \mathcal F = \mathcal P(\Omega)$ (power set i.e. set of all subsets), and probability measure $p(0) = p(1) = \frac 12$, one cannot define two identically distributed Bernoulli random variables $X,Y$ which are independent.

That is, if you're performing an experiment which involves the recording of two iid Bernoullis (e.g. flipping two independent coins), you cannot use the smaller sample space $\{0,1\}$ to achieve this. The proof is along the lines given in that answer, suitably modified. Another way of saying this is that the probability space above is not rich enough to accommodate two iid Bernoulli random variables.

In everything said below, we assume that $X_i$ are real-valued random variables. (They could also take values in smaller sets like $\{0,1\}$). There is a technical assumption called the Borel condition which is required for the uncountable case , so we assume all our sample spaces are Borel spaces as well.


The "index set" : beginning the modelling of a stochastic process
Typically, when one says that $(X_t)_{t \in T}$ is a stochastic process, this by definition means that there is a probability space rich enough to accommodate all those random variables.
So, how can we do it for various kinds of stochastic processes?
First, find $T$, the "index" of the stochastic process, roughly the number of random variables required. It could be just $T = \{1\}$, or maybe $T = \{1,2,3,4,5\}$ or $T = \mathbb N$ or $T = [0,\infty)$, which is pretty complicated.
Then, the process depends upon the structure of $T$. If $T$ is finite, life is easy. If $T$ is countable, it is a little more involved, but still easy. If $T$ is uncountable, then it is somewhat difficult.
So the probability space for a stochastic process needs to be very rich if you want to define a "useful" enough stochastic process (think about accommodating infinitely many iid Bernoullis, for instance). For example, on the $\Omega$ defined previously, I can have the stochastic process given by $X_1,X_2,\ldots$ such that $X_1$ is Bernoulli and $X_2=X_1,X_3=X_1,X_4=X_1,\ldots$ so that everything is equal to $X_1$. You can check that $(X_i)_{i=1,2,\ldots}$ as defined is a stochastic process on $\{0,1\}$, with infinite time set. It's not very interesting, though.
The advantage with increasing your sample space and sigma-algebra is that you can study more events. The problem is that it becomes more and more difficult to define a probability measure consistently. (The Lebesgue measure cannot be defined on all subsets under some set-theoretic assumptions, for example, but it can be defined on a restricted set of subsets). That problem, though, is not really present in the finite and infinite cases, which are the ones you speak of.

Finite index set
Let's say $T$ is finite. For example ,let's say you are executing a random walk with $Z_i$ being iid for $i=1,2,\ldots,77$ and you have $X_j = Z_1 + \ldots + Z_j$ for $j=1,2,\ldots,77$, so that $T = \{1,2,\ldots,77\}$. Then you would do the following :

*

*Sample space $\Omega = \{0,1\}^{77}$ ($77$ indicates the Cartesian product of $\{0,1\}$ with itself $77$ times).


*The sigma algebra equals $\mathbb P(\{0,1\}^{77})$.


*Define the probability measure as $$\mathbb P(\omega_1,\omega_2,\ldots,\omega_{77}) = \binom{77}{k} \frac{1}{2^{77}}$$
where $k$ is the number of $1$s among $\omega_1,\omega_2,\ldots,\omega_{77}$.
The defined probability space is rich enough to study the simple symmetric random walk up to $77$ steps : the measure is not really important because it is just the induced measure from the individual $\mu_i$.
It is easy to generalize this construction to the following result.

Let $(\Omega_i,\mathcal F_i), i \in 1,2, \ldots,n$ be measurable spaces and $X_i$ be random variables on $\Omega_i$ (which induce measures $\mu_i$ on $\Omega_i$). There exists a probability space (referred to as $\prod_{i=1}^n \Omega_i$, it is the Cartesian product of the $\Omega_i$) and a sigma-algebra $\prod_{i=1}^n \mathcal F_i$ on $\prod_{i=1}^n \Omega_i$ such that the stochastic process $(Y_t)_{t \in \{1,2,\ldots,n\}}$ is definable on $\prod_{i=1}^n \Omega_i$, where $Y_t = X_t$ in distribution and the $Y_i$ are independent random variables.

Therefore, accommodating finitely many random variables to form a finite time stochastic process is never ever a problem.
Therefore, let's say you want to study a random walk only till time $1000$, or study $316409$ (find out how I'm related to $316409$ if you're bored) coin flips. The resulting stochastic process is always definable.

If you plan to study a simple symmetric random walk only up to a finite number of steps, or study finitely many coin flips, then the above has your back fully covered.


Countably infinite index set
The trouble starts with a countably infinite bunch of random variables. This post goes through these cases in some detail.
However, the infinite case is fully defined in the theorem of Ionescu-Tulcea.

Theorem [Ionescu-Tulcea for independent random variables] : Let $(\Omega_i,\mathcal F_i)$ be probability spaces for $i=1,2,\ldots$. Let $X_i$ be random variables on $\Omega_i$. Then, the product sample space $\prod_{i=1}^{\infty} \Omega_i$ along with the product sigma-algebra $\prod_{i=1}^{\infty} \mathcal F_i$ is rich enough to be the probability space for the stochastic process $(Y_i)_{i=1,2,\ldots}$ where $Y_i=X_i$ in distribution and $Y_i$ are independent random variables.

That is, if you want to put infinitely many random variables independently together as a stochastic process, there is a probability space which will let you do that.
So the simple symmetric random walk as a stochastic process, is a set of random variables on $\prod_{i=1}^{\infty} \Omega_i = \{(\omega_1,\omega_2,\ldots) : \omega_i \in \{0,1\}\}$ along with the product sigma-algebra. That is the appropriate space for conducting a simple random walk where you don't intend to stop at a finite time.
So, the moral of your story is :

To construct a stochastic process of infinite index whose random variables $X_i$ are independent,

*

* Create the sample space $(\Omega_i,\mathcal F_i)$ for each of them.

* Construct explicitly via definition, or (if you only care about definition) merely assert that the product space $\prod_{i=1}^{\infty} \Omega_i$ and the product sigma-algebra $$$\prod_{i=1}^{\infty} \mathcal F_i$ exist. 

* The stochastic process $(X_i)_{i=1,2,\dots}$ sits as a random variable here. Do what you like with it. 


That should do it for your question. Note that we can model non-independent $X_i$ as well : that's what Ionescu-Tulcea's extension theorem says in full detail. Having said that, the theory behind that is a little more involved (and it's a corollary of Kolmogorov's extension theorem anyway) so I'll instead refer to Achim Klenke's "Probability Theory" Theorem 14.32 for this.
We still have the uncountable case to go.

I think your question is answered, but I'd urge you to read on anyway to see a little more advanced situation.


The uncountable index case
In the uncountable case, things are difficult. One cannot be too lazy and merely take the uncountable product here : the sigma-algebra fails to have a meaningful probability measure on it.
For example, what about uncountably many Bernoullis? The Brownian motion? Spaces such as $\{0,1\}^{\infty}$ with product sigma-algebra are simply not rich enough to accommodate such processes. We need to do better.
Which is why Kolmogorov's consistency theorem is one of the most beautiful results in probability theory. It states that, under certain conditions, one can define a probability space that can accommodate rich enough structure among uncountably many random variables (which may very well include them not being independent of each other). Let me set it up with some notation.
Let $(\Omega_i,A_i)_{i \in [0,\infty)}$ be sample spaces (they should be Borel, but that's technical and we glance over it). Let $X_i$ be random variables on $(\Omega_i,A_i)$. For every finite subset $S \subset [0,\infty)$, define the probability spaces $\Omega^S = \prod_{i\in S} \Omega_i$ with $\mathcal F^S = \prod_{i\in S}$. Note that $(X_i)_{i \in S}$ are well-defined random variables (or finite-index stochastic processes, if you like) on $\Omega^S$ by the finite case.
We impose the following consistency condition on these random variables.

For every $L \subset J \subset [0,\infty)$ with $J$ finite, and $B \in \mathcal F^J$, we have $$
\mathcal P_{\Omega^L}((X_l)_{l \in L} \in B) = \mathcal P_{\Omega^J}((X_j)_{j \in J} \in (\phi^{J}_L)^{-1}(B))
$$
where $\phi^J_L$ is a map from $\mathbb R^{|J|} \to \mathbb R^{|L|}$ given by projection i.e. retaining only those coordinates whose indexes are given by $L$. For example, $\phi_{\{1,5,7\}}^{\{1,2,3,4,5,6,7\}}((2,4,6,8,10,12,14)) = (2,10,14)$.

The theorem of Kolmogorov is the following :

If $X_i$ satisfy the consistency conditions, there is a probability space where the stochastic process $(X_i)_{i \in [0,\infty)}$ can be defined such that the distributions $(X_i)_{i \in L}$ for every finite subset $L$ are exactly the same as that described in $\Omega^L$.

That is, under the consistency condition, one may define a stochastic process on $[0,\infty)$. This may be used to define, for example,

*

*Uncountably many Bernoulli random variables.


*The Brownian motion.


*Markov control processes, which are Markov chains with transition matrices controlled by non-deterministic functions.

Conclusion
In this answer, I tried to cover

*

*What was wrong with your construction of the random walk as a stochastic process.


*The procedure for deciding the sample space of a stochastic process.


*How it's done in the finite and countably infinite case.


*How it's done in the uncountably infinite case.
