If it is known that the random variable X has a CDF:
FX(t)={0t<−112−1≤t<034+t20≤t<12112≤t
I wish to find E[(X−a)2] for all a∈R
I found that E[(X−a)2]=E[X2]−2aE[X]+a2
my teacher solved it this way:
what I'm trying to understand is the reason for the integrals used to find E[X],E[X2]. Why does this work?
Answer
The first equality in the computation of E[X2] follows from the fact that, for a non-negative random variable Y with CDF G, we have that
E[Y]=∫∞0ydG(y)=∫∞0(1−G(t))dt.
You can find a proof of this here.
To see the first equality for E[X], we use the above result, along with the fact for a non-positive random variable Y with CDF G,
E[Y]=∫0−∞ydG(y)=−∫0−∞G(t)dt.
You can prove this in a way similar to the analogous result for non-negative random variables.
Putting the two facts together allows us to write
E[X]=∫∞−∞xdFX(x)=∫∞0xdFX(x)+∫0−∞xdFX(x)=∫∞0(1−FX(t))dt−∫0−∞FX(t)dt.
No comments:
Post a Comment