I'm new to stats and I facing problems in finding the median of a PDF.
I have to find the median of this PDF
$$ f(x) =
\begin{cases}
cx^2, & \text{if 0 $\le$ $x$ $\le$ 3} \\
0, & \text{otherwise}
\end{cases}$$
How I'm trying to solve it
First I found the value o $c$
$$\int_0^3 cx^2 dx = 1 \implies c = \frac{1}{26}$$
Second
Given that the median is a number $m$ such that $P(X\le m) =\frac{1}{2}$ I did:
$$\int_0^m\frac{1}{26}x^2dx = \frac{1}{2}$$
I have two questions concerning my attempt:
1 – What I'm doing is correct? As I said, I'm new to stats and I'm sure if my approach is the correct one to find the median of the PDF
2 – How can I can integrate from zero to $m$? I have $x$ as a parameter in my integral and $m$ as its upper bond. I'm confused in how to solve that.
Best Answer
You made an error. The setup is correct, but $c = 1/9$.
Why did you stop? Follow through next time. $$\frac12 = \int_0^m \frac{1}{9}x^2\,dx = \frac{1}{27}m^3-\frac{1}{27}(0)^3 = \frac{1}{27}m^3.$$ This gives $m = \sqrt[3]{27/2}.$