E[f(X)] - Expectation of function of rand. var.

1. Mar 20, 2009

Apteronotus

Hi quick question:

Suppose you have a function of random variables given in the following way

Z=X if condition A
Z=Y if condition B

where both X and Y are random variables, and conditions A & B are disjoint.

Then would the expectation of Z be

E[Z]=E[X]*Pr(A)+E[Y]*Pr(B)?

Last edited: Mar 20, 2009
2. Mar 20, 2009

Focus

No you need independence for that, what you really mean is
$$Z=X\mathbf{1}_A+Y\mathbf{1}_B$$
where 1 is the indicator function. Now take the expectation
$$\mathbb{E}[Z]=\mathbb{E}[X\mathbf{1}_A]+\mathbb{E}[Y\mathbf{1}_B]$$.

Now you know that $\mathbb{E}[\mathbf{1}_A]=\mathbb{P}(A)$, but to separate the expectations, you need independence between X and A, also between Y and B.

3. Mar 20, 2009

Apteronotus

$$\mathbb{E}[f(X)]=\int_{\mathbb{F}}f(x)F(dx)$$
$$\mathbb{E}[f(X)]=\int_{\mathbb{R}}f(x)f_X(x)dx$$.