# Find a constant in a density function

$f(x) = \begin{cases} k\sqrt{x}, 0<x<1 \\ 0, \text{elsewhere}\\ \end{cases}$

I know that $E[X] = \frac{2k}{5}$ and $Var[X] = \frac {2k}{7}$

Then what can I do to find $k$ with these few information?

-
oops...I approve the edit by Rick wrongly. – Justin H. Oct 23 '12 at 7:56
However, there's a typo mistake, it should be $0<x<1$ instead of $x>0$ – Justin H. Oct 23 '12 at 7:56

Updated to match the corrected version of the question:

You must have $$\int_{-\infty}^\infty f(x)~dx=1$$ in order for $f$ to be a probability density function. In this case

$$\int_{-\infty}^\infty f(x)~dx=\int_0^1 k\sqrt x~dx=k\int_0^1 x^{1/2}~dx\;,$$

so you need only solve the equation

$$k\int_0^1 x^{1/2}~dx=1$$

for $k$.

-
Sorry sir, there's a typo mistake, it should be $0<x<1$ instead of $x>0$ in the first line. – Justin H. Oct 23 '12 at 7:57
If it's $0<x<1$, is $k=\frac32$? – Justin H. Oct 23 '12 at 7:58
@Justin: Yes, in that case $k=\frac32$; I’ll update the answer. – Brian M. Scott Oct 23 '12 at 8:00
I got it. Thanks bro. – Justin H. Oct 23 '12 at 8:02
@Justin: You’re welcome. – Brian M. Scott Oct 23 '12 at 8:02