Solved – How to turn a function into a probability density whilst maintaining the shape of the function

distributionsprobability

I have a series of functions, each one supposedly representing the density of a random variable across agents. Each function also has a domain, which describes what values of the random variable are valid.

Now, if I remember my stats classes correctly, if I take the integral of one of the functions across the values described by the function's domain, I should get a value of 1.0. This does not happen however.

Is there a normalization technique that can turn a function into a true probability density, yet maintains the shape of the function?

All the functions are of the form $\frac{a}{bx}+c$, where $x$ is the random variable, and $a,b,c$ are varying constants.

Best Answer

If you have a non-negative integrable function $f$ with domain $D$ such that

$$ k = \int_{D} f(x) dx < \infty $$

Then $f(x)/k$ is a probability density on $D$. The value $k$ is known as the normalizing constant.

Edit: In your example you said that $f(x) = \frac{a}{bx} + c$ for known constants $a,b,c$. In that case, the indefinite integral is simple to compute and the normalizing constant would be

$$ k = \left[ \frac{a \log(x) }{b} + cx \right]_{D}$$

if $D$ is an interval $(A,B)$ then this simplifies to

$$ k = \frac{a}{b} \cdot \log \left( \frac{B}{A} \right) + c(B-A) $$ Therefore $$ g(x) = \frac{\frac{a}{bx} + c}{\frac{a}{b} \cdot \log \left( \frac{B}{A} \right) + c(B-A)}$$ is a probability density on $(A,B)$.

Related Question