Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Chapter2_MorePyMC/MorePyMC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down