[Math] Expected value vs using method of indicator

discrete mathematicsnormal distributionprobabilityprobability theoryrandom variables

I am having a hard time understanding the difference between getting the Expected value by finding the mean E(X)=np and using the method of indicator to find the expected value.

For example if we wanted to find the expected value after throwing a die it would be:

1/6 * 1 + 1/6 * 2 + 1/6 *3 + 1/6 * 4 + 1/6 * 5 + 1/6 *6 = 3.5

Now using the method of indicator it says to take make event Xi equal to 1 if the event occurs or 0 if the event does not occur. So instead of taking the random variable 1,2,3,4,5,6 and multiplying times the probability of getting that random variable, we are suppose to find E(Xi) where Xi is (assuming) the event of rolling the number that leads to the event happening. We multiple 1*P(number showing up on roll)=E(Xi). Since the chances are equally likely it is 1/6 so we get 1*1/6. We then get E(X) by calculating E(X)=E(X1)+E(X2)+...+E(Xn) which is taking the expected value of each event which is really just taking the probability of each event times 1 or 0(lost here – 1 if the event happened but 0 if it didnt. The problem i am having is wont it always be 1 since we are finding the expected value of that specific event?). Clearly my answer does not come out to be the same as just doing 1/6 * 1 + 1/6 * 2 + 1/6 *3 + 1/6 * 4 + 1/6 * 5 + 1/6 *6 so i have no idea what the heck i am doing. Very frustrating. I don't understand the method of indicator, i am hoping someone can help by maybe showing me another example doing it both ways so i can understand the difference.

Best Answer

Denote by $r$ the outcome "numerical value that comes up if we roll once a standard six-faced fair die" and by $I_i \equiv I\{r=i\}$ the indicator function that takes the value $1$ when $r=i$ and zero in all other cases. The $\{r=i\}$'s are the elementary events.

Now, we can express the value of $r$ as

$$r = \sum_{i=1}^6iI(r=i)$$

We want the expected value of the outcome, $E(r)$. We have

$$E(r) = E\Big(\sum_{i=1}^6iI(r=i)\Big)$$ and using the linearity property of the expected value, and the fact that the $i$'s are constants, we get

$$E(r) = \sum_{i=1}^6iE[I(r=i)]$$

But $E(I_i) = P(r=i)$. Substituting,

$$E(r) = \sum_{i=1}^6iP(r=i)$$

which is what we wanted to show.