# How can I calculate this expected value?

I have this exercise

" Are $$X_1 ,X_2, ...$$ indipendent random variables, that $$X_n \sim 1/2\delta_{ 1/2}+ 1/2\mu_n$$, where $$\delta_x$$ is the Borel probability that $$\delta_x(x)=1$$ and $$\mu_n \sim U(1-(1/n) , 1+(1/n))$$ calculate the expected value of $$X_n$$"

But i have problem with the $$X_n$$ because is a mixture of two distribution and I don't know what I can do.

Thanks to all!

## 2 Answers

There are a bunch of ways to think about this. Here is one. Let $A$ be the event $X_n=1/2$. Then

$$E[X_n]=E[X_n | A] P[A] + E[X_n | A^c] P[A^c] = \frac{1}{2} \frac{1}{2} + \frac{1}{2} E[X_n | A^c].$$

Now this last expectation is just an ordinary expectation of a uniform distribution.

The expectation belonging to $\mu_n$ is $1$ for all $n$.

The expectation belonging to $\delta_{\frac12}$ is $\frac12$.

The expectation belonging to the mixture is the corresponding linear combination of the expectations:

$$E=\frac12(\frac12+1)=\frac34.$$