## find the expected value of g(x)

Standard deviation, mean, variance, z-scores, t-tests, etc.
zorro
Posts: 28
Joined: Sat Jun 12, 2010 9:26 am
Contact:

### find the expected value of g(x)

Problem : If the probability of X is given by
$f(x) =
\begin{cases}
x/2, & 0 < x < 1 \\
1/2, & 1 < x < 2 \\
(3-x)/2, & 2 < x < 3 \\
0 & elsewhere
\end{cases}$

find the expected value of $g(x) = X^2 - 5X + 3$

Solution :

$\int\limits_{0}^{1} . g(x) \frac{x}{2}, dx + \int\limits_{1}^{2} . g(x) \frac{1}{2}, dx + \int\limits_{2}^{3} g(x) \frac{3-x}{2}, dx$

is this process which i am following is it correct or no?

jk22
Posts: 10
Joined: Sat Jun 26, 2010 10:39 am
Contact:

### Re: find the expected value of g(x)

Hallo, nice to meet you. >I'm new on this forum.

For me this process of calculation is correct, even if there is a way to see the things that I'm not sure about :

We need <g(X)=Y>=<Y>, and then we need the probability density of Y. I don't know if this gives the same result. (We know that Y runs over [-13/4;3] if x runs over [0;3]).

From this we see there could appear a problem if g were not bijective.

See you soon, with friendly greetings.
Last edited by jk22 on Sat Jun 26, 2010 1:55 pm, edited 1 time in total.

maggiemagnet
Posts: 350
Joined: Mon Dec 08, 2008 12:32 am
Contact:

### Re: find the expected value of g(x)

According to this Wikipedia article, yes, it looks like you have set this up correctly. Do you need any help with the integrations?

jk22
Posts: 10
Joined: Sat Jun 26, 2010 10:39 am
Contact:

### Re: find the expected value of g(x)

Hallo, nice to meet you too.

Thanks for the reference. Me I lost myself in : should I calculate like this :

y=g(x), then :

$==\int yf_y(y)dy=\int_3^1yf_y(y)dy+...\textrm{other sections}=\int_0^1 g(x)f_y(g(x))g'(x)dx+...=\int_0^1g(x)f(x)dx+...$

and hence we find the distribution of Y : f_y(g(x))g'(x)=f(x), or f_y(y)=f(g^-1(y))/g'(g^-1(y)), to get the same as above.

zorro
Posts: 28
Joined: Sat Jun 12, 2010 9:26 am
Contact:

### Re: find the expected value of g(x)

THANKS GUYS FOR ALL UR POST ......I JUST NEEDED TO CHECK IF I WAS DOING IT CORRECTLY OR NO ......