Here we take the distribution function as cumulative distribution function and not probability density function..Reason bein when we integrate the probability density function over the interval , we get the probability over the interval..Now this probabiltiy should be greater than or equal to 0 or less than or equal to 1.But here when we integrate the function over interval from x = 2 to x = 4, the value comes out to be greater than 1 which is wrong..Hence we take the given distribution function as cumulative distribution function.. Cumulative distribution function of a random variable x means :
If a value of a random variable is F(x) then it means probability the random variable takes any value <= x is given by F(x)..
So to find P(2 <= x < 4) , we need to find F(4) and F(2) and then perform F(4) - F(2)..
So according to the piecewise definition of function given in the question :
F(4) = 1 [ Here we take 3/4 and not 1 bcoz we are asked the probability of x < 1 and not x <= 1 ]
F(2) = 3/5 = 0.6 [Here we have taken 3/5 bcoz if we take 1/2 + x/8 then x = 2 will be deleted bt we want x = 2 in our answer..]
Hence P(2 <= x < 4) = 1 - 0.6
= 0.4
Hence required probability should be 0.40
Had it been P(2 < x < 4) , then it would have been 0.25 as in that case x = 2 would not be allowed hence it needed to be subtracted..