# Finding the expected value $E(X)$ and $E(Y)$

A random variable $$N$$ is uniformly distributed on $$\{1,2,...,10\}$$ Let $$X$$ be the indicator of the event($$N\le 5$$) and $$Y$$ be the indicator of the event ($$N$$ is even)

So I have to find $$E(X)$$ and $$E(Y)$$

From the formula sheet I know

$$E(X) = \sum_i x_iP(x_i)$$ $$E(Y) = E[E(Y\mid X=x_i)]$$

but i don't get how to select the xi and P(xi) to solve this problem. The answer says $$E(X)=E(Y) =1/2$$ but It does not have any process inside so I could not understand can anyone help me about this

Looking at RHS of equality: $$\mathbb EX=\sum_ix_iP(x_i)$$ we observe that a term $$x_iP(x_i)$$ is only relevant if: $$x_iP(x_i)\neq0$$

That will be the case here if and only if $$x_i=1$$ and in that case: $$P(x_i)=P(1)=\Pr(X=1)=\Pr(N\leq5)=\frac5{10}=\frac12$$

So we find:$$\mathbb EX=1\cdot\frac12=\frac12$$You can find $$\mathbb EY$$ on a similar way.

• why there will be only case xi = 1? – 헬창공돌이 Apr 17 at 10:59
• @헬창공돌이 Because $X$ is an indicator, then by definition it equals 1 when $N\leq 5$ and $0$ otherwise.$$X=\begin{cases}1&:& N\leq 5\\0&:& N>5\end{cases}$$ So therefore: $\mathsf E(X)=0\cdot\mathsf P(N>5)+ 1\cdot\mathsf P(N\leq 5)$ . – Graham Kemp Apr 17 at 11:02

The two rv's are both bernulli with parameter 0.5 thus their expectation is $$0\times 0.5 + 1\times 0.5 =0.5$$

This because the rv that describes the event $$N\leq 5$$ can take only the values 0 and 1 (false or true) with probability 0.5 as you have 5 favourable events among 10 equiprobable ones

Similar reasoning for the other rv

• could you explain more further sorry T_T – 헬창공돌이 Apr 17 at 9:22
• Added some details in my answer. If it has been useful you can mark it as accepted – tommik Apr 17 at 9:36