Random variable - what does mean the condition in definition The definition of random variable in my book is:
This is a function $X: \Omega \rightarrow R$, such that $ \{ \omega : X(\omega) < x\} \in S $
where $S$ is sigma-algebra, $\Omega$ is sample space and $\omega$ is single event.
What does mean the condition $ \{ \omega : X(\omega) < x\} \in S $ ?
 A: For random variables on many sample spaces $\Omega$, it is not possible to define a probability measure $P$ on every subset of $\Omega$ in a consistent way. The cure is to speak of probabilities of events which must be subsets of some sigma-algebra $S$ of subsets of $\Omega$. A useful random variable involves subsets of $S.$ The condition you ask about ensures we don't try to find the probability of an event $\{\omega: X(\omega) < x\}$ that does not have a probability.
Note: This technical requirement, for measurability in the definition of a random variable, is not an issue for random variables in ordinary applications. So don't expect anyone to give you an example of a subset of $\Omega$ that causes trouble.
A: The $\sigma$-algebra $S$ is a collection of subsets of $\Omega$ which satisfies certain properties. The condition $\{\omega : X(\omega) < x\} \in S$ means that the set $\{\omega : X(\omega) < x\}$ belongs to $S$ for all $x$.
Why is this condition needed? If the sample space $\Omega$ is finite then this condition isn't needed: you can (and usually should) take $S$ to consist of all subsets of $\Omega$. However, when $\Omega$ is infinite, you could run into trouble with non-measurable sets. Let $A$ be some non-measurable set on $\Omega = [0,1]$. You can construct a function $X\colon \Omega \to \mathbb{R}$ which is the indicator function of $A$. What is the expectation of $X$? What is the probability that $X < 1/2$? It is difficult to answer these questions since $A$ is not measurable. If you allow arbitrary $X$ then you run into paradoxes stemming from these issues. Hence we define a random variable to be measurable in the sense that $\Pr[X < x]$ is defined for all $x$.
