given a graph of density function, what can we conclude about expected value

347 Views Asked by At

given the following graph (the density function), what can we conclude about the expected value? I got stuck a little bit with that question and I would appreciate your help!

I found out that C must be equal $\frac{2}{7}$ that the distribution function would be valid (=1).

furthermore, I know that $E[x]=\int_{-\infty}^{\infty}xf(x)dx$. but here it's equal to: $\int_{1}^{2}x(\frac{1}{7}x-\frac{1}{7})dx+\int_{2}^{4}x(\frac{2}{7})dx+\int_{4}^{6}x(-\frac{1}{7}x+\frac{4}{7})dx$ (after calculating the functions that describe each part of the graph).

Now - from evaluating the above sum of integrals I get the value of about 0.2 while it doesn't seem reasonable! from the graph it should be more then 3 as I understand.

would appreciate your help and advice!

enter image description here

2

There are 2 best solutions below

0
On

Your density can be split in three parts $f_1$, $f_2$ and $f_3$:

$f_1(x) \cdot x = -2/7 \cdot x + 2/7 \cdot x^2$

$f_2(x) \cdot x = 2/7 \cdot x$

$f_3(x) \cdot x = 6/7\cdot x -1/7 \cdot x^2$

Then then antiderivatives are:

$I_1(x) = -2/14\cdot x^2 + 2/21 \cdot x^3$

$I_2(x) = 2/14 \cdot x^2$

$I_3(x) = 6/14 \cdot x^2 -1/21 \cdot x^3$

And finally the sum of the integrals:

$E = (-2/14 \cdot 2^2 + 2/21 \cdot 2^3 + 2/14 \cdot 1^2 - 2/21 \cdot 1^3) + ( 2/14 \cdot 4^2 - 2/14 \cdot 2^2) + (6/14 \cdot 6^2 -1/21 \cdot 6^3 - 6/14 \cdot 4^2 + 1/21 \cdot 4^3) = (-8+2+32-8+216-96)/14 + (16-2-216+64)/21 = 23/7 \approx 3.285714$

2
On

I have $c=\frac{2}{7}$ as well. The area is

$0.5c+2c+c=1$

$3.5c=1 \Rightarrow c=\frac{2}{7}$

The pdf is

$f(x)=\begin{cases} c\cdot (x-1), \ 1\leq x <2 \\ c , \quad \ 2\leq x <4 \\ c-1/2\cdot c\cdot (x-4), \ 4\leq x <6 \end{cases}$

The slope of the third interval is $\frac{f(x_1)-f(x_2)}{x_1-x_2}=\frac{c-0}{4-6}$

We can use the integral calculation as well to get the value of c.

$\int_1^2 c\cdot(x-1) \, dx+\int_2^4 c \, dx+\int_4^6 c-1/2\cdot c\cdot (x-4) \, dx=1$

$=\frac{c}{2}+2c+c=1$

And the expected value is

$E(X)=\int_1^2 2/7\cdot (x-1)\cdot x \, dx+\int_2^4 2/7\cdot x \, dx+\int_4^6 (2/7-1/2\cdot 2/7\cdot (x-4))\cdot x \, dx$

Thus $E(X)=\frac{23}{7}=3\frac27$