# Math Help - Help finding median

1. ## Help finding median

If Y had the density function

$f(y)=\left\{\begin{array}{cc}.2,&\mbox{ if }-1

Find the median and $E[y-median]$.

From what I have read, I need to solve $\int_{-\infty}^{\infty}f(y)dy=\frac{1}{2}$

In this case, I have $\int_{-1}^{m}\frac{1}{5}dy+\int_{m}^{1}\frac{1}{5}+\frac{ 6}{5}ydy=\frac{1}{2}$

I end up with 0.91267

Not sure that I am on the right track, some guidence would be great

Thank you

2. Originally Posted by Danneedshelp
If Y had the density function

$f(y)=\left\{\begin{array}{cc}.2,&\mbox{ if }-1

Find the median and $E[y-median]$.

From what I have read, I need to solve $\int_{-\infty}^{\infty}f(y)dy=\frac{1}{2}$ Mr F says: No. Solve ${\color{red}\int_{-\infty}^{m}f(y)dy=\frac{1}{2}}$.

In this case, I have $\int_{-1}^{m}\frac{1}{5}dy+\int_{m}^{1}\frac{1}{5}+\frac{ 6}{5}ydy=\frac{1}{2}$ Mr F says: No. Solve ${\color{red}\int_{-1}^{0}\frac{1}{5} \, dy +\int_{0}^{m}\frac{1}{5}+\frac{6}{5}y \, dy = \frac{1}{2}}$
I end up with 0.91267

Not sure that I am on the right track, some guidence would be great

Thank you
You should also sketch a graph of the pdf to see what's happening (it will be clear by the way that m > 0). It would then be clear that your answer looks much too big.

For the next part note that $E(Y - m) = E(Y) - m$ and you should know how to calculate E(Y) when given the pdf.