Let X be the result of rolling a D6. What is the probability of X = 6 given that X is even? What is the expected value of X given that X is even?
I was able to calculate the probability of X=6 given that X is even by using conditional probability formula. My final answer was 1/3. However, I struggle with expected value which it come to conditional probability so was unable to find the expected part. Can someone please explain how you tackle expected value for these type of questions. Many thanks
One way.
Under the condition that $X$ is even we can just leave our original probability space with outcome set $\{1,2,3,4,5,6\}$ and switch it for one that uses outcome set $\{2,4,6\}$. The equiprobability of the outcomes is not touched and now there are $3$ in stead of $6$. So we have $P(X=2)=P(X=4)=P(X=6)=\frac13$.
Then we find the expected value under this condition as:$$2P(X=2)+4P(X=4)+6P(X=6)=4$$
Another way.
We do not leave our original probability space and first go for finding $P(X=k\mid X\text{ is even})$ for even numbers.
Doing so for e.g. $k=2$ gives:$$P(X=2\mid X\text{ is even})=P(X=2,X\text{ is even})/P(X\text{ is even})=$$$$P(X=2)/P(X\text{ is even})=\frac16/\frac36=\frac13$$
Then we can go on with:$$\mathbb E[X\mid X\text{ is even}]=\sum_{x\in{2,4,6}}xP(X=x\mid X\text{ is even})=4$$
Third way.
In the original space for $B=\{2,4,6\}$ we find $\mathbb EX\mathbf1_B(X)$ and $P(X\in B)$ and then apply the formula:$$\mathbb{E}\left[X\mid X\in B\right]=\frac{\mathbb{E}X\mathbf{1}_{B}\left(X\right)}{P\left(X\in B\right)}$$
Here $P(X\in B)=\frac12$ and: $$\mathbb EX\mathbf1_B(X)=\sum_{x=1}^6x1_B(x)P(X=x)=\sum_{x\in\{2,4,6\}}x\times\frac16=2$$
Actually there is not much of an essential difference between the second and the third way. I would recommend to go for the first (changing probability space) but this always in the awareness that often expectations can be found without any searching for the distribution.