CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.51k stars 7.84k forks source link

Chapter 3 minor question #543

Open missflash opened 2 years ago

missflash commented 2 years ago

I have a minor question at Chapter 3.

Why probability of belonging to cluster 1 was calculated as the following [Figure 1] rather than this?

v = (1 - p_trace) norm_pdf(x, loc=center_trace[:, 1], scale=std_trace[:, 1]) > \ p_trace norm_pdf(x, loc=center_trace[:, 0], scale=std_trace[:, 0])

[Figure 1] 525755D7-DD5A-4701-9778-D1CB80FA69F4

Thank you for your wonderful book!