bayes-rules / bayesrules

📦 R package for Supplemental Materials for the Bayes Rules! Book
https://bayes-rules.github.io/bayesrules/docs/
GNU General Public License v3.0
70 stars 10 forks source link

Book - section: 3.3 The Beta posterior model, small typo within plot_beta_binomial formula #66

Closed TedBYanKei closed 3 years ago

TedBYanKei commented 3 years ago

Reading/working through the https://www.bayesrulesbook.com/ book (thank you for making it available online), and noted in section "3.3 The Beta posterior model" (https://www.bayesrulesbook.com/chapter-3.html#the-beta-posterior-model) there is the example code formula of: plot_beta_binomial(alpha = 45, beta = 55, x = 30, n = 50)

Within the documentation of plot_beta_binomial: https://rdrr.io/github/mdogucu/bayesrules/man/plot_beta_binomial.html there is a 'y' argument, but not a 'x' argument, as within the section of the online/bookdown book as above.

Upon changing to: plot_beta_binomial(alpha = 45, beta = 55, y = 30, n = 50) it works / creates the image as within the example in the book.

Thus I believe the "x = 30" is a typo, and should be "y = 30" and thus wanted to point out.

Again thank you for making this great resource available online, am enjoying learning a number of things as I go.

mdogucu commented 3 years ago

Thank you for bringing this to our attention. We have changed our book notation from x to y because it made the notation consistent with the later chapters that we are writing. We had forgotten to make the changes public. Thanks to your gentle nudge we have made our changes public. The book and the package should be consistent now. We are glad to hear that you are enjoying the book. Happy reading!