Can this function be a density function of a continuous random variable X?

39 Views Asked by At

F(x) = 0, if x < 1 F(x) = 1, if 1<=x<=2 F(x) = 0, if x>2

I think it could be, as long as the integral is 1. Any ideas?

1

There are 1 best solutions below

0
On

Your function is the probability density function of a random variable distributed uniformly on the interval $[1,2]$.

As well as having an integral across the real numbers of $1$, a probability density function also needs to be non-negative. Your function has this property.