In general: f(X) = 1 / (b –a), where a = Xmin, b = Xmax and a < X < b.
If Xmax = 20, and Xmin = 0, f(X), which is a constant, is 1/20.
P(X) = area = width x height.
To find the probability that X is between 0 and 2:[1]
P( 0 < X < 2 ) = (2 – 0)( 1/20) = 2/20 = 0.1