Tom K. answered 05/31/21
Knowledgeable and Friendly Math and Statistics Tutor
If this problem is supposed to be solved using a particular programming language, I can't help you. The answer is straightforward.
Solution 1:
(5.8 - 3)/(8 - 3) = 2.8/5 = .56
Solution 2:
If a distribution is uniform from 3 to 8, f(x) = 1/(8-3) = 1/5 on 3 <= x <= 8
Then, P(X <= 5.8) = 1/5(5.8-3) = 1/5(2.8) = .56
Solution 3:
If f(x) = .2 on 3 <= x <= 8,
F(x) = 0 x <= 3
.2(x - 3) = .2x - .6 3 <= x <= 8
1 x <= 8
Then, P(X <= 5.8) = F(5.8) = .2(5.8) - .6 = 1.16 - .6 = .56