(A brief note for the spanish readers: *lo siento, tenía ganas desde hace mucho tiempo de añadir notas técnicas -dan menos disgustos que las entradas sobre irritaciones-, quería apuntar la solución a un problema que me ha surgido en más de una ocasión, y, además, resulta que los sitios de internet donde lo he encontrado ni se molestan en desarrollarlo -de ahí que lo ponga en inglés-. No sólo de tontás vive el ingeniero *;P )

Gaussian probability density functions (pdf), which have two parameters and this nice syntax -in the unidimensional case-:

and, of course, with an integral over that yields 1 (as any pdf), are the most common formalization for the shape of uncertainty in science. When we do not know why and how some measurement varies over time in spite of the underlying system staying invariant (apparently), and in addition have no idea about the internals of the process that is producing that measurement, and in addition we *do* know that measurements move around a central value with high simmetry, it is usual to bring the familiar (and beautiful) graph of a gaussian to light:

The main reason for the prevalence of this pdf is the formidable evidence that supports the Central Limit Theorem, by which, for example, the sum of many measurements taken from a given random process -independently-, divided by the number of them, is a new measurement which tends to have a gaussian shape, more and more gaussian as that number of measurements increases. Actually, the CLT works very well in so many disciplines and problems, even when the measurements do not come from identically distributed processes, that gaussians are taken as the default probabilistic model of uncertainty in countless situations.

Not to mention the important mathematical simplifications that are enabled when the gaussian assumption is made 😉

Well, sometimes you find in your calculations products of gaussian **functions**. Some of those times what you actually find are products of gaussian **pdfs**, which are a subset of all the possible gaussian functions; for example, when you assume independent, multiple measurements in the likelihood factor of the bayes rule (ok, in estimation theory that factor is evaluated pointwise and it is common not to need any closed form for it -it is just a number after all-, but at other times you need to know that form in order to figure out its influence on the prior; or maybe it is just you are curious 😉 ).

Anyway, the difference between a gaussian function and a gaussian pdf is that the former does not need to integrate to 1 in its whole support.

You can find easily in Internet that the product of two gaussian functions is a gaussian function. That is true, although it is rare -I could’nt- to find an algebraic demonstrarion of why. Moreover, in some places you can find even the value for the parameters of the resulting gaussian **pdf** of the product of two gaussian **pdfs**, but again an algebraical deduction is missing, and, more importantly…

… it turns out that the product of two gaussian **pdfs** *is not* a gaussian **pdf**! It is a gaussian **function**, or, in other words, a scaled gaussian pdf (which cannot be called a pdf at all!).

The purpose of this post is to show why is that so, thus let us go for the demonstration.

Let and be two gaussian **pdfs** with the same support:

Their product is:

The first trick: since is greater than zero (otherwise we are talking about the product of two Dirac’s delta functions, which would be 0 unless ), we can complicate the previous product a little bit without altering its value:

Now we can separate a factor which resembles the scale factor of a gaussian pdf:

Ok, it is time to focus only on the exponent of . Firstly, we incorporate the previous scale factor into it:

Then we expand the square terms that include :

And then we collect the numerator as a polynomial in :

The second trick: a polynomial of the form turns out to be equivalent to , which is the form of the exponent of an unidimensional gaussian pdf plus a constant term. Casually, we had in the above expresion that polynomial if we do:

We are just a few steps from knowing how close is our product of gaussian pdfs to yield another gaussian pdf! But first, let us take a short detour to obtain the value of in our expression:

Let be an abbreviation of that disturbing and proceed with expanding terms:

Ook. We have already values for and . Using those letters, the resulting product of the two gaussian pdfs has become:

Notice that the first factor and the first exponential **are** a gaussian pdf. The whole result, however, is just a gaussian function, unless the second exponential equals 1…

Let us take a closer look to that second exponential, the reason why our result is not a gaussian pdf but a gaussian function:

Surprisingly, this last expression is a gaussian pdf if we consider a variable, i.e., (we can also consider the variable). But what we are interested in is knowing under which conditions this expression equals 1, and, thus, the product of our original pdfs and is actually a gaussian pdf:

Since is greater than zero, and the expectations are independent from the variances, we will always find cases (infinite cases, actually) in which the equality does not hold. Thus, we will find infinite cases where the product of two gaussian pdfs is a gaussian function but *not* a gaussian pdf.

Nevertheless: the scaled gaussian function obtained as the result of the product has the following pdf-like parameters:

which are the same you can find in the Internet… But remember: it is not a gaussian pdf even when we use these parameters to describe it!

**NOTE**: In the case that , the two expressions above are simpler:

Pingback: Lithographica » Blog Archive » Esto es un estadístico (gordo) que va con una Wii y…