2
$\begingroup$

Let $X$ be some random variable. Now define a new random variable $Y$ such that it has a probability $p$ of taking some fixed number $a$, and a probability $(1-p)$ of being determined by $X$.

What is the expected value of $Y$? Is it true that it is just $E[Y] = pa + (1-p)E[X]$? If this is the case, how do I prove this?

1 Answers 1

8

Write $Y=Ba+(1-B)X$ where $B$ is independent of $X$, $\mathrm P(B=1)=p$ and $\mathrm P(B=0)=1-p$ (the random variable $B$ is called a Bernoulli random variable).

Then, $Y$ has the distribution described in the post and, by linearity of the expectation and independence of $B$ and $X$, $\mathrm E(Y)=\mathrm E(B)a+\mathrm E(1-B)\mathrm E(X)=pa+(1-p)\mathrm E(X)$.