[SOLVED] P.D.F: Continuous random variables

Firstly, I must apologise for the poor notation. I tried to use the \array command but I couldn't get it to work.

1) The random variable Q has P.D.F given by:

$\displaystyle f(q)=kq^3$ if $\displaystyle 0\leq q\leq 2$

$\displaystyle f(q)=0$ otherwise

Find k (answer: $\displaystyle \frac{1}{4}$)

2)The random variable J has probability density function $\displaystyle f(j)=3j^k$ if $\displaystyle 0\leq j\leq 1 $

$\displaystyle f(j)=0 $ otherwise

Find k (answer: 2)

I honestly don't know where to start because I missed a lesson and am trying to catch up, but reading and retaining information can be a lot harder than being taught it.