# What are the bounds for this median?

Ok, I can't figure out how to exactly calculate the median. I have a pdf for a continuous random variable f(x) = x/2, for 0 < x < 2, and 0 otherwise. I THINK the median is found using something like $$1/2 = \int_0^m x/2 \,dx$$, but I don't know what the lower bound is supposed to be in this context.

• Never mind, I figured it out. I had it right. According to a website Let X be a continuous random variable. The median of X is the number M such that P(X ≤ M) = 1/2. Mar 5 '17 at 18:41
• @johny The median is not the mean.
– mlc
Mar 5 '17 at 18:44

In general for a continuous random variable the median is the value $n$ which satisfies $$\int_{-\infty}^m f(x) \,dx = \frac12$$ which, with the particular density you mention corresponding to a triangular distribution with parameters $a=0, b=2, c=2$, indeed gives the expression in your question, leading you to solve $\frac{m^2}{4}=\frac12$, i.e. $m= \sqrt{2}$, slightly more than the mean of $\frac43$ and rather less than the mode of $2$.