Suppose that the random variable x obeys the uniform distribution on a certain interval, and E (x) = 3, D (x) = 1 / 3, find the probability density function f (x) of X

Suppose that the random variable x obeys the uniform distribution on a certain interval, and E (x) = 3, D (x) = 1 / 3, find the probability density function f (x) of X

The expectation of uniform distribution U (a, b) is (a + b) / 2, the variance is (B-A) ^ 2 / 12, so a + B = 6, (B-A) ^ 2 / 12 = 1 / 3, so a + B = 6, B-A = 2A = 2, B = 4