example computing expectation

85 Views Asked by At

I am trying to understand the following example:

A fair die is rolled, and whichever number comes up, a fair coin is then flipped that many times. Let $N$ be the outcome of the die roll, and $X$ the number of heads obtained. Then

$$E(X)= \sum_{i=1}^6 E(X\mid N=i)P(N=i)=\sum_{i=1}^6 \frac{i}{2}\cdot\frac{1}{6}=\frac{21}{12}=\frac{7}{4}. $$

My problem is that I cannot figure out how the author got $\frac{i}{2}$. I think that the sample space is $$\Omega=\left\{(i,(j_1, j_2, \ldots, j_i)):i\in[6], j_k\in \left\{H,T \right\} \text{for each}\, k \right\}.$$ Also, $|\Omega|=\sum_{i=1}^6 2^i=126$.

To compute the conditional expectation I need to figure out

$$E(X\mid N=i)=\sum_{x\in \mathbb{R}}x\cdot P(\left\{X=x\right\}\mid N=i),$$

which is the ugly definition given by the notes I'm reading. I would like to see know what $\left\{ X=x\right \}\cap \left\{N=i\right\}$ is in order to compute the conditional probability. I think the notation is confusing me, Can anyone clarify this? Thank you so much!

1

There are 1 best solutions below

6
On BEST ANSWER

Let $(Y_j)_{j=1,\ldots i}$ be a sequence of random variables defined in the following way. $$Y_j = \begin{cases}1 & \text{if the } j^{th} \text{ coin toss results in heads} \\ 0 & \text{if the } j^{th} \text{ coin toss results in tails} \end{cases}$$

Define $X$ to be the number of heads in $i$ tosses. I hope you will agree to the observation that $X = \sum_{j=1}^iY_j$.

Due to the linearity of expectation you can write $E[X] = \sum_{j=1}^iE[Y_j]$. $$E[Y_j] = 1 \times P\{\text{obtaining heads in the } j^{th} \text{ toss}\} + 0\times P\{\text{obtaining tails in the } j^{th} \text{ toss}\} $$ If you have a fair coin, $$E[Y_j] = 1 \times\frac{1}{2} + 0\times\frac{1}{2} = \frac{1}{2}$$ So then, $E[X] = \sum_{j=1}^i\frac{1}{2} = \frac{i}{2}$.