From eea6e4860690871eba2a16344a4cd8e420d4020e Mon Sep 17 00:00:00 2001 From: Rik Huijzer <20724914+rikhuijzer@users.noreply.github.com> Date: Mon, 26 Oct 2020 17:47:46 +0100 Subject: [PATCH] Fix order heads and tails in the Beta distribution The order was reversed as could be seen by computing the posterior distribution for one heads or one tails. For example, if you calculated the posterior for a sample of size one and containing one heads, the posterior plot would show that the parameter is most likely to be `0` whereas the plot shows that an higher value means a higher probability for heads. --- 0_Introduction.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0_Introduction.ipynb b/0_Introduction.ipynb index a8139b8bc..e2730a35e 100644 --- a/0_Introduction.ipynb +++ b/0_Introduction.ipynb @@ -170,7 +170,7 @@ " tails = N - heads\n", " \n", " # Update our prior belief in closed form (this is possible because we use a conjugate prior).\n", - " updated_belief = Beta(prior_belief.α + heads, prior_belief.β + tails)\n", + " updated_belief = Beta(prior_belief.α + tails, prior_belief.β + heads)\n", "\n", " # Plotting\n", " plot(updated_belief, \n",