mml-book / mml-book.github.io

Companion webpage to the book "Mathematics For Machine Learning"
12.91k stars 2.39k forks source link

Possible problem with section 6.5.2 Product of Gaussian Densities #691

Open ardollam opened 2 years ago

ardollam commented 2 years ago

image

Hi:

I have been enjoying reading your book and watching the Youtube videos (especially the one on probability spaces and random variables).

I believe that there is a problem, though, with the section on products of gaussian densities (see attached screen capture). I do not think that (a) the product of two gaussians is a gaussian, and also, (b) I am not sure that the product of a prior and a likelihood is necessarily the product of two gaussians. For (a), take a look at this posting on stack exchange: https://math.stackexchange.com/questions/101062/is-the-product-of-two-gaussian-random-variables-also-a-gaussian

Good luck with the book and your course.

Sincerely,

Niall Bolger

chengsoonong commented 2 years ago

The product of two Gaussian random variables is not a Gaussian random variable. This product is a new random variable, which is not Gaussian distributed. However, the product of two Gaussian densities is a Gaussian density. The Gaussian density is a function, and this is product of two functions that results in a third function, which just so happens you can identify the third function as a Gaussian density.

ardollam commented 2 years ago

Dear Professor Ong:

Thanks for your reply. Can you point me to sources that clarify the distinction between Gaussian densities and Gaussian random variables?

Sincerely,

Niall Bolger

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Mon, Sep 20, 2021 at 9:44 AM Cheng Soon Ong @.***> wrote:

The product of two Gaussian random variables is not a Gaussian random variable. This product is a new random variable, which is not Gaussian distributed. However, the product of two Gaussian densities is a Gaussian density. The Gaussian density is a function, and this is product of two functions that results in a third function, which just so happens you can identify the third function as a Gaussian density.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mml-book/mml-book.github.io/issues/691#issuecomment-922941858, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEFSIT3CYXTDYRSDCDLUC43FLANCNFSM5EKNWIIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

chengsoonong commented 2 years ago

I feel that the confusion here is between two distinct concepts of random variables and densities. At the beginning of Chapter 6, we give a brief discussion. We also point to the excellent more detailed introduction by Michael Betancourt: https://betanalpha.github.io/assets/case_studies/probability_theory.html

The Gaussian distribution discussion follows from the distinction between random variables and densities.

ardollam commented 2 years ago

Dear Professor Ong:

Thanks for pointing me to these sources. I look forward to reading them.

Sincerely,

Niall Bolger

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Sep 23, 2021 at 1:01 AM Cheng Soon Ong @.***> wrote:

I feel that the confusion here is between two distinct concepts of Random variables and densities. At the beginning of Chapter 6, we give a brief discussion. We also point to the excellent more detailed introduction by Michael Betancourt: https://betanalpha.github.io/assets/case_studies/probability_theory.html

The Gaussian distribution discussion follows from the distinction between random variables and densities.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mml-book/mml-book.github.io/issues/691#issuecomment-925508240, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEGPZP7SYBXG7SKMLLDUDKYCBANCNFSM5EKNWIIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agezerlis commented 2 years ago

The product of two Gaussian random variables is not a Gaussian random variable. This product is a new random variable, which is not Gaussian distributed. However, the product of two Gaussian densities is a Gaussian density. The Gaussian density is a function, and this is product of two functions that results in a third function, which just so happens you can identify the third function as a Gaussian density.

p. 201 is ambiguous, but p. 312 unambiguously states that "the product of two Gaussian random variables is an (unnormalized) Gaussian distribution", see image below

Screen Shot 2021-12-15 at 11 06 03 AM

2