Suppose the random variable X has the cdf F(x) =
0, for x < -1
(x+2)/4, for -1 ≤ x < 1
1, for 1 ≤ x
Write an R function to sketch the graph of F(x). Use your graph to obtain the probabilities:
(a) P(-1/2 < X ≤ 1/2); (b) P(X = 0); (c) P(X = 1); (d) P(2 < X ≤ 3).