[Math] sums and product of density functions are density

probabilityprobability distributionsprobability theoryproof-verification

Given $f,g$ to be density functions. If the function $\psi = \lambda f +(1-\lambda)g$, for $\lambda \in [0,1]$, a density function? If the product $fg$ is also a density function?

I know that a random variable $X$ is called continuous if its distribution function can be expressed as
$$F(x) = \int_{-\infty}^xf(u) du,$$
for some $f: \mathbb{R} \to [0,\infty)$ called the (probability) density function of $X$.

To show that $\psi$ is a density function, I only need to show $\psi$ is integrable, and that the integral is equal to $1$, that is,
$$\int_{-\infty}^{\infty} \psi =1.$$
We have
$$\int_{-\infty}^{\infty} \psi = \lambda\int_{-\infty}^{\infty} f + (1-\lambda)\int_{-\infty}^{\infty} g.$$
Now, We have that since $f,g$ are density functions, then
$$\int_{-\infty}^{\infty} f(u)du = \lim_{x \to \infty} F(x) = 1,$$
and
$$\int_{-\infty}^{\infty} g(u)du = \lim_{x \to \infty} G(x) = 1,$$
thus $$\int_{-\infty}^{\infty} \psi = \lambda + 1 – \lambda = 1,$$ as required. Also, $\psi \geq 0$, because the image of $f,g$ are non-negative and $\lambda \in [0,1]$. For the other part, I was given a hint that the product $fg$ is not necessarily a density function. For example, let $f=g=1$ for $x \in [0,1]$, then $fg=1$ for $x \in [0,1]$. I just cannot see clearly, why this example is not a density function? Can someone show me why is it not a density function?

Thanks in advance.

Best Answer

I think the example $f=g=1$ on $[0,1]$ is not a counterexample— it's a positive example of two density functions whose product is also a density function. A counterexample might be something like:

Let $f(x) = 1$ if $x \in [0, 1]$, and zero elsewhere. Let $g(x) = 1$ if $x \in [2,3]$ and zero elsewhere. The product $fg$ is zero everywhere, and is not a density function. (The trick here is that the density functions don't "overlap"— they have nonoverlapping support.)


A side note: in order for $\psi$ to be a density function, its total integral must be equal to one (not just finite): $$\int_{-\infty}^\infty \psi(x)dx = 1.$$

And $\psi$ must also have $\psi(x) \geq 0$ everywhere. When $\lambda \in [0,1]$, the convex sum $\lambda f + (1-\lambda)g$ is a density function in this way, as you point out.