You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter2_MorePyMC/MorePyMC.ipynb
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@
152
152
"\n",
153
153
"where 0, 4 are the `DiscreteUniform`-specific lower and upper bound on the random variable. The [PyMC docs](http://pymc-devs.github.com/pymc/distributions.html) contain the specific parameters for stochastic variables. (Or use `??` if you are using IPython!)\n",
154
154
"\n",
155
-
"The `name` attribute is used to retrieve the posterior distribution later in the analysis, so it is best to use a descriptive name. Typically, I use the Python variable's name as the name.\n",
155
+
"The `name` attribute is used to retrieve the posterior distribution later in the analysis, so it is best to use a descriptive name. Typically, I use the Python variable's name as the `name`.\n",
156
156
"\n",
157
157
"For multivariable problems, rather than creating a Python array of stochastic variables, addressing the `size` keyword in the call to a `Stochastic` variable creates multivariate array of (independent) stochastic variables. The array behaves like a Numpy array when used like one, and references to its `value` attribute return Numpy arrays. \n",
158
158
"\n",
@@ -1787,7 +1787,7 @@
1787
1787
"cell_type": "markdown",
1788
1788
"metadata": {},
1789
1789
"source": [
1790
-
"Adding a constant term $\\alpha$ amounts to shifting the curve left or right (hence why it is called a *bias*. )\n",
1790
+
"Adding a constant term $\\alpha$ amounts to shifting the curve left or right (hence why it is called a *bias*).\n",
1791
1791
"\n",
1792
1792
"Let's start modeling this in PyMC. The $\\beta, \\alpha$ parameters have no reason to be positive, bounded or relatively large, so they are best modeled by a *Normal random variable*, introduced next."
1793
1793
]
@@ -1798,7 +1798,7 @@
1798
1798
"source": [
1799
1799
"### Normal distributions\n",
1800
1800
"\n",
1801
-
"A Normal random variable, denoted $X \\sim N(\\mu, 1/\\tau)$, has a distribution with two parameters: the mean, $\\mu$, and the *precision*, $\\tau$. Those familiar with the Normal distribution already have probably seen $\\sigma^2$ instead of $\\tau^{-1}$. They are in fact reciprocals of each other. The change was motivated by simpler mathematical analysis and is an artifact of older Bayesian methods. Just remember: The smaller $\\tau$, the larger the spread of the distribution (i.e. we are more uncertain); the larger $\\tau$, the tighter the distribution (i.e. we are more certain). Regardless, $\\tau$ is always positive. \n",
1801
+
"A Normal random variable, denoted $X \\sim N(\\mu, 1/\\tau)$, has a distribution with two parameters: the mean, $\\mu$, and the *precision*, $\\tau$. Those familiar with the Normal distribution already have probably seen $\\sigma^2$ instead of $\\tau^{-1}$. They are in fact reciprocals of each other. The change was motivated by simpler mathematical analysis and is an artifact of older Bayesian methods. Just remember: the smaller $\\tau$, the larger the spread of the distribution (i.e. we are more uncertain); the larger $\\tau$, the tighter the distribution (i.e. we are more certain). Regardless, $\\tau$ is always positive. \n",
1802
1802
"\n",
1803
1803
"The probability density function of a $N( \\mu, 1/\\tau)$ random variable is:\n",
0 commit comments