Problems with integrating a (step) probability density function I've been sitting a embarrassing amount of time over this problem:
I am given a probability density function f(x) like this:
y= 1/6  when x between [-2,-1]
y= 2/6 when x between [-1,1]
y= 1/6  when x between [1,2]
y= 0 else

My task is to find out how probable it is to get an result between 0.5 and 1.5
My solution for this is:
$$
\int_{0.5}^1\;\frac26\;dx\;+\;\int_1^{1.5}\;\frac16\;dx\;=\;\frac3{12}
$$
My professor's solution is 1/3, so I am probably doing something wrong. I have done the calculation several times so I hope it's not just that. Any help is greatly appreciated.
Thank you!

Your answer seems to be correct as $\int_{0.5}^1 \frac{2}{6} dx = 0.5 * \frac{2}{6} = \frac{1}{6}$ and $\int_1^{1.5} \frac{1}{6} dx = 0.5 \frac{1}{6} = \frac{1}{12}$
And the sum of the two is obviously $\frac{3}{12} = \frac{1}{4}$.
