Math of machine learning boils down to probability theory, calculus and linear algebra/matrix analysis. The one gem which mesmerizes me most is the so called "probability integral", termed by Prof. Paul J. Nahin, author of *Inside Interesting Integrals [1]. *Or as you might learn in either probability theory or random process class:

Of course, this is related to the Gaussian distribution. When I learnt the probability integral, I first learned the now standard trick of "polar integration" [2]. i.e. We first create a double integral, then transform the integrand using polar coordinate transformation. Here is the detail. Since is an even function. We just need to consider

Then let , and , the Jacobians

.

Substitute to .

or

So .

This is a well known result, you can find it in almost all introductory book on probability distribution.

This derivation is a *trick. *Quite frankly, without reading the textbook. I wouldn't have the imagination to come up with smart way to derive integrals. Perhaps that's why Prof. Nahin said in his book *Inside Interesting Integral [4] :*

THIS IS ABOUT AS CLOSE TO A MIRACLE AS YOU'LL GET IN MATHEMATICS.

and in *Solved Problems in Analysis [5]*, Orin J. Farrell did a similar integral like ,

.

And again he used the polar coordinate transform. He then said "*Indeed, its discoverer was surely a person with great mathematical ingenuity.*" I concur. While the whole proof procedure is only using elementary calculus known by undergraduates. It takes quite a bit of imagination to come up with such method. It's easier for us to use the trick but the originator must be very smart.

I also think this is one of the key Calculus trick to learn if you want to learn more daunting distributions such as gamma, beta or Dirichlet's distribution. So let me give several quick notes on the proof above:

- You can use similar idea to prove the famous gamma and beta function are related as . There are many proofs of this fundamental relationship between gamma and beta function. e.g. PRML[3] ex 2.6 outlines one way to a proof. But I found that first transforming the gamma function with and follow the above polar coordinate transformation trick is the easiest way to proof the relationship.
- As mentioned before, the same proof can also be used in calculating (Also from [5]).
- The polar coordinate trick is not the only way to calculate the probability integral. Look at note [6] on the history of its derivation.

Each of these points deserve a post on its own. So let's say I owe you some more posts.

References:

[1] Paul J. Nahin, *Inside Interesting Integrals.*

[2] Alberto Leon-Garcia, *Probability and Random Processes for Electrical Engineering 2nd Edition.*

[3] Christopher M. Bishop, *Pattern Recognition and Machine Learning.*

[4] Paul J. Nahin, *Inside Interesting Integrals. p.4.*

[5] Orin J. Farrell and Bertram Ross, *Solved Problems in Analysis p.11.*

[6] Author Unknown, *The Probability Integral Link:* http://www.york.ac.uk/depts/maths/histstat/normal_history.pdf