Skip to content

Commit 465e7e1

Browse files
Merge pull request CamDavidsonPilon#346 from sachinthak/dev
Fix for the missing denominator in an example in the PyMC3 version of Chapter4
2 parents bd9de86 + 76d5df9 commit 465e7e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Chapter4_TheGreatestTheoremNeverTold/Ch4_LawOfLargeNumbers_PyMC3.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
"Again, this is fairly obvious after a moments thought: the indicator function is only 1 if the event occurs, so we are summing only the times the event occurs and dividing by the total number of trials (consider how we usually approximate probabilities using frequencies). For example, suppose we wish to estimate the probability that a $Z \\sim Exp(.5)$ is greater than 5, and we have many samples from a $Exp(.5)$ distribution. \n",
234234
"\n",
235235
"\n",
236-
"$$ P( Z > 5 ) = \\sum_{i=1}^N \\mathbb{1}_{z > 5 }(Z_i) $$\n"
236+
"$$ P( Z > 5 ) = \\frac{1}{N}\\sum_{i=1}^N \\mathbb{1}_{z > 5 }(Z_i) $$\n"
237237
]
238238
},
239239
{
@@ -1193,21 +1193,21 @@
11931193
"metadata": {
11941194
"anaconda-cloud": {},
11951195
"kernelspec": {
1196-
"display_name": "Python 2",
1196+
"display_name": "Python 3",
11971197
"language": "python",
1198-
"name": "python2"
1198+
"name": "python3"
11991199
},
12001200
"language_info": {
12011201
"codemirror_mode": {
12021202
"name": "ipython",
1203-
"version": 2
1203+
"version": 3
12041204
},
12051205
"file_extension": ".py",
12061206
"mimetype": "text/x-python",
12071207
"name": "python",
12081208
"nbconvert_exporter": "python",
1209-
"pygments_lexer": "ipython2",
1210-
"version": "2.7.11"
1209+
"pygments_lexer": "ipython3",
1210+
"version": "3.6.0"
12111211
}
12121212
},
12131213
"nbformat": 4,

0 commit comments

Comments
 (0)