For the function $f(x)=a+bx,0\leq x\leq1,$ to be a valid probability density function,which one of the following statements is correct?
1. $a=1,b=4$
2. $b=0.5,b=1$
3. $a=0,b=1$
4. $a=1,b=-1$