What is a sample of a random variable? Random variable $X$ is defined as a measurable function from one $\sigma$-algebra $(\Omega_1, \mathcal F_1)$ with the underlying measure $P$ to another $\sigma$-algebra $(\Omega_2, \mathcal F_2)$.
How do we talk about a sample $X^n$ of this random variable? Do we treat it as an element from $\Omega_2$? Or as the same measurable function as $X$?
Where can I read more about this?
Example:
In Monte Carlo estimation, we prove the unbiasedness of the estimator by considering the samples $(X^n)_{n = 1}^N$ to be the functions. If an expectation of a random variable $X$ is defined as
\begin{align}
\mathbb E[X] = \int_{\Omega_1} X(\omega_1) \,\mathrm dP(\omega_1)
\end{align}
and assuming that $X^n$ are functions and $X^n = X$, we can proceed as follows:
\begin{align}
\mathbb E\left[\frac{1}{N} \sum_{n = 1}^N f(X^n)\right]
&= \frac{1}{N} \sum_{n = 1}^N \mathbb E[f(X^n)] \\
&= \frac{1}{N} \sum_{n = 1}^N \mathbb E[f(X)] \\
&= \mathbb E[f(X)].
\end{align}
If $X^n$ was just an element from $\Omega_2$, we couldn't have written the last set of equations.
 A: Sample can be drawn from population, not from random variable. "Sample of $n$ random variables" is a simplified way of saying that we have a sample drawn from the population, that we assume to be $n$ identically distributed random variables. So such sample behaves like $n$ random variables. It's ambiguous because it mixes terminology used in probability and statistics. The same with simulation, where samples are drawn from common distribution. In both cases sample is the data you have. Samples are considered as random variables because random processes lead to drawing them. They are identically distributed since they come from common distribution. For dealing with samples we have statistics, while statistics use abstract, mathematical description of the it's problems in terms of probability theory, so the terminology is mixed. Random variables are functions assigning probabilities to events that can be encountered in your samples.
A: A sample $(X^1,\ldots,X^N)$ is a measurable function from $\Omega_1$ to $\Omega_2^N$. A realisation of this sample is the value taken by the function at $\omega\in\Omega_1$, $(x^1,\ldots,x^N)=(X^1(\omega),\ldots,X^N(\omega))$.
When stating

assuming that $X^n$ are functions and $X^n=X$

The functions $X^n$ are all different functions, which means that the images $X^1(\omega),\ldots,X^N(\omega)$ may be different for a given $\omega$. When the sample is iid (independent and identically distributed), the functions $X^n$ are different with two further properties


*

*identical distribution, meaning that $\mathbb{P}(X^1\in A)=\cdots=\mathbb{P}(X^N\in A)$ for all measurable sets $A$ in $\mathcal{F}_2$;

*independence, meaning that $\mathbb{P}(X^1\in A^1,\ldots,X^N\in A^N)=\mathbb{P}(X^1\in A^1)\cdots\mathbb{P}(X^N\in A^N)$ for all measurable sets $A^1,\ldots,A^N$ in $\mathcal{F}_2$


Your definition 

\begin{align} \mathbb E[X] = \int_{\Omega_1} X(\omega_1) \,\mathrm
 d\omega_1 \end{align}

is incorrect: it should be
\begin{align} \mathbb E[X] = \int_{\Omega_1} X(\omega_1) \,\mathrm
 dP(\omega_1) \end{align}
