Example Of Random Variable

1.  A simple example

Say that we toss a coin two times. The state space will be

\fs4 \Omega = \{HH,HT,TH,TT\}

A \fs4 \sigma-algebra on this set can be the powerset (ie the set of all subsets)

\fs4 \cal{F} = \{\emptyset, HH, HT, \ldots, \{HH,HT\}, \{HH,TH\},\ldots,\{HH,TT,TH\},\ldots,\Omega\}

Since \fs4 \cal{F} is a \fs4 \sigma-algebra, the pair \fs4 (\Omega, \cal{F}) is a measure space. Equipping this measure space with a probability measure \fs4 P defines a probability space \fs4 (\Omega, \cal{F}, P).

Note that we don't say the probability measure, but a probability measure, since this is not unique. For instance a biased coin will define a different probability space compared to a fair one.

Also remember that the probability measure attaches probabilities to members of \fs4 \cal{F} and not \fs4 \Omega. Therefore, the particular partition of the state space via \fs4 \cal{F} will serve as our information.

An example of a random variable would be the number of heads tossed

\fs4  X: \omega \rightarrow \mathbb{R} : X(\omega) = \{\text{# of }H\text{s in }\omega\}

Why is this function \fs4 \cal{F}-measurable? Because for any Borel set \fs4 B\in \cal{B}(\mathbb{R})

\fs4 X^{-1}(B) = \{\omega \in \Omega : X(\omega) \in B \} \in \cal{F}

For example, for \fs4 B=(3/4,6)

\fs4 X^{-1}((3/4,6)) = \{\omega \in \Omega : X(\omega) \in (3/4,6) \} = \{HT, TH, HH\} \in \cal{F}

2.  Sigma-algebras and information

We mentioned above that the \fs4 \sigma-algebra is a measure of our information. In particular, considering the powerset of \fs4 \Omega is equivalent to observing and recording both tosses of the coin.

This will be made clear with another example. Say that we consider another \fs4 \sigma-algebra, namely

\fs4  \cal{G} = \{\emptyset, \{HH, HT\}, \{TH, TT\}, \Omega\}

It is straightfoward to verify that this is indeed a \fs4 \sigma-algebra on \fs4 \Omega, and that this algebra is smaller that the previous one, \fs4 \cal{G} \subset \cal{F}. In iformation terms, \fs4 \cal{G} is equivalent as observing only the first coin toss. Why is that? Because we can only define probabilities on set that differ at the first coin toss.

Let us investigate now the random variable \fs4 X, which is the sum of heads. Is it \fs4 \cal{G}-measurable? The answer is no; since as before for the set \fs4 B=(3/4,6)

\fs4 X^{-1}((3/4,6)) = \{\omega \in \Omega : X(\omega) \in (3/4,6) \} = \{HT, TH, HH\} \notin \cal{G}

What does that mean? That we cannot consider this random variable with the information that we have: if we observe only the first toss we cannot assess the total number of heads.

On the other hand the random variable

\fs4  Y: \omega \rightarrow \mathbb{R} : X(\omega) = \{1 \text{ if the first toss in }\omega\text{ is a }H\}

is \fs4 \cal{G}-measurable. For instance for the same Borel set

\fs4 Y^{-1}((3/4,6)) = \{\omega \in \Omega : Y(\omega) \in (3/4,6) \} = \{HT, HH\} \in \cal{G}

And of course, since \fs4 \cal{G} \subset \cal{F}, any \fs4 \cal{G}-measurable random variable will also be \fs4 \cal{F}-measurable. As we increase our information set we can attach probabilities to more events, not less!

3.  Expectations

Say that we are interested in the expectation \fs4 EX on \fs4 (\Omega, \cal{F}, P). Since \fs4 X is \fs4 \cal{F}-measurable the expectation is valid and we can apply the definition

\fs4 EX = \sum_{\omega \in \Omega} X(\omega) P(\omega)

If we also assume that the coin is fair when determining the probability measure \fs4 P, then all \fs4 \omega \in \Omega will have equal probabilities \fs4 P(\omega) = 1/4. Therefore

\fs4 EX = 1/4 \cdot (X(HH) + X(HT) + X(TH) + X(TT)) = 1/4 \cdot (2+1+1+0) = 1

4.  Conditional expectations

Can we compute the expectation \fs4 EX on a different probability space \fs4 (\Omega, \cal{G}, P), with limited information? The answer is no, since \fs4 X is not \fs4 \cal{G}-measurable. But if we consider the sub-\fs4 \sigma-algebra \fs4 \cal{G} (that is we observe only the first toss) we can determine the conditional expectation \fs4 E[X|\cal{G}], which, according to its definition, is a \fs4 \cal{G}-measurable random variable $} satisfying (for all \fs4 G \in \cal{G})

\fs4 \sum_{\omega \in G} Y(\omega) P(\omega) = \sum_{\omega \in G} X(\omega) P(\omega)

Now this will imply

\fs4 G = \emptyset \Rightarrow 0 = 0
\fs4 G = \Omega \Rightarrow 1/4 \cdot (Y(HH) + Y(HT) + Y(TH) + Y(TT)) = 1
\fs4 G = \{HH, HT\} \Rightarrow 1/4 \cdot (Y(HH) + Y(HT)) = 3/4
\fs4 G = \{TH, TT\} \Rightarrow 1/4 \cdot (Y(TH) + Y(TT)) = 1/4

Since we want \fs4 Y to be \fs4 \cal{G}-measurable we can ask for \fs4 Y to be constant within each partition \fs4 \{HH,HT\} and \fs4 \{TH,TT\}. This will give the random variable

\fs4  Y: \Omega \rightarrow \mathbb{R}: Y(HH) = Y(HT) = 3/2, Y(TH) = Y(TT) = 1/2

Is this random variable \fs4 \cal{G}-measurable? The answer is yes. Remember \fs4 X was not, and we used the Borel set \fs4 (3/4,6) as an example. For \fs4 Y we have

\fs4 Y^{-1}((3/4,6)) = \{\omega \in \Omega : Y(\omega) \in (3/4,6) \} = \{HT, HH\} \in \cal{G}

5.  Conditional probability

The conditional probability is defined as the conditional expectation of the indicator function. Consider a set \fs4 F \in \cal{F}. Then

\fs4 P[F|\cal{G}] = E[I_F|\cal{G}]

Say that \fs4 F = \{HT, TH\}. Then the indicator function will induce the random variable

\fs4  I_F: \Omega \rightarrow \mathbb{R}: I_F(HH) = I_F(TT) = 0, I_F(HT) = I_F(TH) = 1



What links here?


Got a question?

A short note

''To stop bots posting Viagra adverts as comments I have put a password in place. It just reads AEKARA, which you can use to edit the pages on this site. Sorry for any inconvenience but it was getting a real pain.

Comments(add/edit)