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.55k stars 7.85k forks source link

Chapter 2 Improper testval for true_answers #380

Open activatedgeek opened 6 years ago

activatedgeek commented 6 years ago

I am talking about the Code Block [32] in Ch2_MorePyMC_PyMC3.ipynb which says in the section titled "Example: Cheating among students"

with model:
    true_answers = pm.Bernoulli("truths", p, shape=N, testval=np.random.binomial(1, 0.5, N))

Shouldn't the testval be np.random.binomial(1, p, N)?