What is the distribution of a random variable with pdf proportional to the product of two normal pdf's
(* Get product of two normal pdf's *)
prod= PDF[NormalDistribution[μ1, σ1], x]*PDF[NormalDistribution[μ2, σ2], x];
(* Normalize so that the pdf integrates to 1 *)
pdf = prod/Integrate[prod, {x, -∞, ∞}, Assumptions -> {σ1 > 0, σ2 > 0}];
(* Construct associated distribution *)
d = ProbabilityDistribution[pdf, {x, -∞, ∞}, Assumptions -> {σ1 > 0, σ2 > 0}];
(* Find mean and variance *)
Mean[d]
(* (μ2 σ1^2+μ1 σ2^2)/(σ1^2+σ2^2) *)
Variance[d]
(* (σ1^2 σ2^2)/(σ1^2+σ2^2) *)
This matches what the article says the mean and variance should be. But is it a normal distribution? If the moment generating function is of the same form as for a normal distribution, then it has a normal distribution. (We could also use the characteristic function to do this for this particular distribution.)
(* The log of the moment generating function will be in the following form *)
logCF = Expectation[Exp[t z], z \[Distributed] NormalDistribution[μ, σ]] /.
Power[E, x_] -> x // Expand
(* t μ+(t^2 σ^2)/2 *)
(* So we look to see if the moment generating function of distribution d is of the same form *)
Collect[Expectation[Exp[t z], z \[Distributed] d] /. Power[E, x_] -> x // Expand, t]
(* (t^2 σ1^2 σ2^2)/(2 (σ1^2+σ2^2))+t ((μ2 σ1^2)/(σ1^2+σ2^2)+(μ1 σ2^2)/(σ1^2+σ2^2)) *)
And it is.
d1 = NormalDistribution[m1, s1];
d2 = NormalDistribution[m2, s2];
These distributions require that
assume = And @@
(DistributionParameterAssumptions /@ {d1, d2})
(* m1 ∈ Reals && s1 > 0 && m2 ∈ Reals && s2 > 0 *)
As pointed out by @JimB, the PDF
formed by the product of the normal PDF
s is
PDFprod = Assuming[assume, PDF[d1, x]*PDF[d2, x]/
Integrate[PDF[d1, x]*PDF[d2, x],
{x, -Infinity, Infinity}] // Simplify]
(* (E^(-((m2 s1^2 + m1 s2^2 - (s1^2 + s2^2) x)^2/(
2 s1^2 s2^2 (s1^2 + s2^2)))) Sqrt[s1^2 + s2^2])/(Sqrt[2 π] s1 s2) *)
Comparing with the PDF
of the expected normal distribution
PDFprod == Assuming[assume, PDF[NormalDistribution[
(m1*s2^2 + m2*s1^2)/(s1^2 + s2^2),
Sqrt[s1^2*s2^2/(s1^2 + s2^2)]], x] // Simplify]
(* True *)