How do i tell if a Function is a valid Probability density function. For example let $f$ be a function defined on a set of real numbers and $f(x) = 0.3$ when $0\leq x\leq10$. For a function like this how do i tell if its a valid function when all the other values of $f$ are not defined?
do i just integrate $f$ over $[0,10]$ and if its value is $1$ or less than $1$ it is valid?