I have a pdf where it is kx for 0 < x < 1 and k for 1 < x < 2
I am having trouble doing the cdf and not sure when I am going wrong. I calculated k as equal to 1. Then I got x^2/2 for 0 < x < 1 and ((x^2) + 2x - 2 )/ 2 for 1 < x < 2
Anyone see where I have gone wrong?
Guide:
Find $k$ on base of: $$\int_0^1kxdx+\int_1^2kdx=1$$
(Notice that $k=1$ cannot be correct since $\int_0^1 xdx+\int_1^2 dx>1$)
Then find $F$ on base of $$F(x)=\int^x_\infty f(y)dy$$ where $f$ denotes the PDF. Be aware of the fact that $f$ takes value $0$ outside the interval $[0,2]$.