# How to reduce the probability density function of binary normal distribution to the form of textbook

The probability density function of binary normal distribution in textbooks is in the following form:

Refine[PDF[
MultinormalDistribution[{μ1, μ2}, {{σ1^2, ρ*\
σ1*σ2}, {ρ*σ1*σ2, σ2^2}}], {x,
y}], σ1 > 0 && σ2 > 0 && ρ > 0]
(-(1/(2 (1 - ρ^2) )) ((x - μ1)^2/ (σ1^2)  - (
2 ρ (x - μ1) (y - μ2))/( σ1 σ2) + (y \
- μ2)^2/ (σ2^2) ) // Expand)

(1/2 (-(((x - μ1) (μ1 σ2 - μ2 ρ σ1 - \
σ2 x + ρ σ1 y))/((ρ^2 -
1) σ1^2 σ2)) - ((y - μ2) (-(μ1 ρ \
σ2) + μ2 σ1 + ρ σ2 x + σ1 \
(-y)))/((ρ^2 - 1) σ1 σ2^2)) // Expand)


Although the expansion form of PDF[MultinormalDistribution[{μ1, μ2}, {{σ1^2, ρ* σ1*σ2}, {ρ*σ1*σ2, σ2^2}}], {x, y}] is consistent with the textbook, I still want to reduce it to the following output form and keep it unchanged:

1/(2 π*σ1*σ2*(1 - ρ^2)^(1/2))*
E^(-(1/(2 (1 - ρ^2))) ((x - μ1)^2/(σ1^2) - (2 ρ \
(x - μ1) (y - μ2))/(σ1 σ2) + (y - μ2)^2/(\
σ2^2)))


$$\frac{1}{2\pi\sigma1\sigma2\sqrt{(1-\rho^{2})}} \mathrm{e}^{-\frac{1}{2(1-\rho^{2})}(\frac{(x-\mu1)^{2}}{\sigma1^{2}}-\frac{2\rho(x-\mu1)(y-\mu2)}{\sigma1\sigma2}+\frac{(y-\mu2)^{2}}{\sigma2^{2}})}$$

What should I do?

• Use BinormalDistribution, i.e., PDF[BinormalDistribution[{μ1, μ2}, {σ1, σ2}, ρ], {x, y}] – Bob Hanlon Feb 22 '20 at 2:03
• @BobHanlon Thank you very much, but how to reduce the above content to the required output format through Simplify and Collect functions, etc. – A little mouse on the pampas Feb 22 '20 at 2:09
• A starting point: Simplify[MapAll[Factor, PDF[MultinormalDistribution[{μ1, μ2}, {{σ1^2, ρ*σ1*σ2}, {ρ*σ1*σ2, σ2^2}}], {x, y}]], σ1 > 0 && σ2 > 0 && ρ > 0] /. Power[p_, q_] :> Power[p, Normal[Simplify[Series[Numerator[q], {y, μ2, 2}]]]/Denominator[q]]. – J. M.'s ennui Apr 25 '20 at 10:52