diff --git a/Chapter2_MorePyMC/MorePyMC.ipynb b/Chapter2_MorePyMC/MorePyMC.ipynb index dc80dbad..d73edd4d 100644 --- a/Chapter2_MorePyMC/MorePyMC.ipynb +++ b/Chapter2_MorePyMC/MorePyMC.ipynb @@ -709,7 +709,7 @@ "source": [ "Had we had stronger beliefs, we could have expressed them in the prior above.\n", "\n", - "For this example, consider $p_A = 0.05$, and $N = 1500$ users shown site A, and we will simulate whether the user made a purchase or not. To simulate this from $N$ trials, we will use a *Bernoulli* distribution: if $ X\\ \\sim \\text{Ber}(p)$, then $X$ is 1 with probability $p$ and 0 with probability $1-p$. Of course, in practice we do not know $p_A$, but we will use it here to simulate the data." + "For this example, consider $p_A = 0.05$, and $N = 1500$ users shown site A, and we will simulate whether the user made a purchase or not. To simulate this from $N$ trials, we will use a *Bernoulli* distribution: if $ X\\ \\sim \\text{Ber}(p)$, then $X$ is 1 with probability $p$ and 0 with probability $1$. Of course, in practice we do not know $p_A$, but we will use it here to simulate the data." ] }, { @@ -1819,7 +1819,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "A Normal random variable can take on any real value, but the variable is very likely to be relatively close to $\\mu$. In fact, the expected value of a Normal is equal to its $\\mu$ parameter:\n", + "A Normal random variable can be take on any real number, but the variable is very likely to be relatively close to $\\mu$. In fact, the expected value of a Normal is equal to its $\\mu$ parameter:\n", "\n", "$$ E[ X | \\mu, \\tau] = \\mu$$\n", "\n", @@ -2048,8 +2048,8 @@ "input": [ "from scipy.stats.mstats import mquantiles\n", "\n", - "# vectorized bottom and top 5% quantiles for \"confidence interval\"\n", - "qs = mquantiles(p_t, [0.05, 0.95], axis=0)\n", + "# vectorized bottom and top 2.5% quantiles for \"confidence interval\"\n", + "qs = mquantiles(p_t, [0.025, 0.975], axis=0)\n", "plt.fill_between(t[:, 0], *qs, alpha=0.7,\n", " color=\"#7A68A6\")\n", "\n",