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

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)?

Thanks in advance.
 
Last edited:
280
1
No you need independence for that, what you really mean is
[tex]Z=X\mathbf{1}_A+Y\mathbf{1}_B[/tex]
where 1 is the indicator function. Now take the expectation
[tex]\mathbb{E}[Z]=\mathbb{E}[X\mathbf{1}_A]+\mathbb{E}[Y\mathbf{1}_B] [/tex].

Now you know that [itex]\mathbb{E}[\mathbf{1}_A]=\mathbb{P}(A)[/itex], but to separate the expectations, you need independence between X and A, also between Y and B.
 
Thank you Focus for your reply. I see my error.
 
Last edited:
280
1
You can use
[tex]\mathbb{E}[f(X)]=\int_{\mathbb{F}}f(x)F(dx)[/tex]
where F is the law of X. This may be somewhat abstract so if you are working over the reals and have a pdf f_X then
[tex]\mathbb{E}[f(X)]=\int_{\mathbb{R}}f(x)f_X(x)dx[/tex].
 

Related Threads for: E[f(X)] - Expectation of function of rand. var.

Replies
3
Views
10K
Replies
1
Views
2K
Replies
1
Views
6K
  • Posted
Replies
5
Views
616
  • Posted
Replies
9
Views
20K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top