Skip to content

Commit f98fa55

Browse files
committed
changes brought from conference
1 parent d8615df commit f98fa55

14 files changed

+4509
-707
lines changed

.DS_Store

6 KB
Binary file not shown.

notebooks/.DS_Store

6 KB
Binary file not shown.

notebooks/01a-instructor-probability-simulation.ipynb

Lines changed: 74 additions & 41 deletions
Large diffs are not rendered by default.

notebooks/01a-student-probability-simulation.ipynb

Lines changed: 425 additions & 92 deletions
Large diffs are not rendered by default.

notebooks/01b-instructor-joint-conditional-probability.ipynb

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
"sns.set()"
2323
]
2424
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": 2,
28+
"metadata": {},
29+
"outputs": [],
30+
"source": [
31+
"%qtconsole"
32+
]
33+
},
2534
{
2635
"cell_type": "markdown",
2736
"metadata": {},
@@ -167,7 +176,7 @@
167176
},
168177
{
169178
"cell_type": "code",
170-
"execution_count": 4,
179+
"execution_count": 9,
171180
"metadata": {},
172181
"outputs": [
173182
{
@@ -176,7 +185,7 @@
176185
"0.724891534007516"
177186
]
178187
},
179-
"execution_count": 4,
188+
"execution_count": 9,
180189
"metadata": {},
181190
"output_type": "execute_result"
182191
}
@@ -201,16 +210,16 @@
201210
},
202211
{
203212
"cell_type": "code",
204-
"execution_count": 5,
213+
"execution_count": 10,
205214
"metadata": {},
206215
"outputs": [
207216
{
208217
"data": {
209218
"text/plain": [
210-
"0.7239874466"
219+
"0.7234514854999999"
211220
]
212221
},
213-
"execution_count": 5,
222+
"execution_count": 10,
214223
"metadata": {},
215224
"output_type": "execute_result"
216225
}
@@ -294,7 +303,7 @@
294303
},
295304
{
296305
"cell_type": "code",
297-
"execution_count": 7,
306+
"execution_count": 15,
298307
"metadata": {},
299308
"outputs": [
300309
{
@@ -303,7 +312,7 @@
303312
"0.8514056224899599"
304313
]
305314
},
306-
"execution_count": 7,
315+
"execution_count": 15,
307316
"metadata": {},
308317
"output_type": "execute_result"
309318
}
@@ -314,7 +323,7 @@
314323
},
315324
{
316325
"cell_type": "code",
317-
"execution_count": 8,
326+
"execution_count": 16,
318327
"metadata": {},
319328
"outputs": [
320329
{
@@ -323,7 +332,7 @@
323332
"0.6942148760330579"
324333
]
325334
},
326-
"execution_count": 8,
335+
"execution_count": 16,
327336
"metadata": {},
328337
"output_type": "execute_result"
329338
}
@@ -335,7 +344,7 @@
335344
},
336345
{
337346
"cell_type": "code",
338-
"execution_count": 9,
347+
"execution_count": 17,
339348
"metadata": {},
340349
"outputs": [
341350
{
@@ -344,7 +353,7 @@
344353
"1.0"
345354
]
346355
},
347-
"execution_count": 9,
356+
"execution_count": 17,
348357
"metadata": {},
349358
"output_type": "execute_result"
350359
}
@@ -552,9 +561,9 @@
552561
],
553562
"metadata": {
554563
"kernelspec": {
555-
"display_name": "bayesian-modelling-tutorial",
564+
"display_name": "Python 3",
556565
"language": "python",
557-
"name": "bayesian-modelling-tutorial"
566+
"name": "python3"
558567
},
559568
"language_info": {
560569
"codemirror_mode": {

notebooks/01b-student-joint-conditional-probability.ipynb

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
{
1111
"cell_type": "code",
12-
"execution_count": null,
12+
"execution_count": 1,
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
@@ -318,37 +318,57 @@
318318
},
319319
{
320320
"cell_type": "code",
321-
"execution_count": null,
322-
"metadata": {},
323-
"outputs": [],
321+
"execution_count": 3,
322+
"metadata": {},
323+
"outputs": [
324+
{
325+
"name": "stdout",
326+
"output_type": "stream",
327+
"text": [
328+
"[531] [99469]\n"
329+
]
330+
}
331+
],
324332
"source": [
325333
"# Take 10,000 subjects\n",
326-
"n = 100000\n",
334+
"n = 100_000\n",
327335
"# Sample for number of users, non-users\n",
328-
"users = ___\n",
329-
"non_users = ___"
336+
"users = np.random.binomial(n, 0.005, 1)\n",
337+
"non_users = n - users\n",
338+
"print(users, non_users)"
330339
]
331340
},
332341
{
333342
"cell_type": "code",
334-
"execution_count": null,
343+
"execution_count": 4,
335344
"metadata": {},
336345
"outputs": [],
337346
"source": [
338347
"# How many of these users tested +ve ?\n",
339-
"u_pos = ___\n",
348+
"u_pos = np.random.binomial(users, 0.99)\n",
340349
"# How many of these non-users tested +ve ?\n",
341-
"non_pos = ___"
350+
"non_pos = np.random.binomial(non_users, 0.01)"
342351
]
343352
},
344353
{
345354
"cell_type": "code",
346-
"execution_count": null,
347-
"metadata": {},
348-
"outputs": [],
355+
"execution_count": 6,
356+
"metadata": {},
357+
"outputs": [
358+
{
359+
"data": {
360+
"text/plain": [
361+
"array([0.34602758])"
362+
]
363+
},
364+
"execution_count": 6,
365+
"metadata": {},
366+
"output_type": "execute_result"
367+
}
368+
],
349369
"source": [
350370
"# how many of those +ve tests were for users?\n",
351-
"_____ / (______ + _________)"
371+
"u_pos / (u_pos + non_pos)"
352372
]
353373
},
354374
{
@@ -447,9 +467,9 @@
447467
],
448468
"metadata": {
449469
"kernelspec": {
450-
"display_name": "bayesian-modelling-tutorial",
470+
"display_name": "Python 3",
451471
"language": "python",
452-
"name": "bayesian-modelling-tutorial"
472+
"name": "python3"
453473
},
454474
"language_info": {
455475
"codemirror_mode": {

notebooks/02-instructor-parameter-estimation.ipynb

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@
314314
],
315315
"metadata": {
316316
"kernelspec": {
317-
"display_name": "bayesian-modelling-tutorial",
317+
"display_name": "Python 3",
318318
"language": "python",
319-
"name": "bayesian-modelling-tutorial"
319+
"name": "python3"
320320
},
321321
"language_info": {
322322
"codemirror_mode": {
@@ -328,20 +328,7 @@
328328
"name": "python",
329329
"nbconvert_exporter": "python",
330330
"pygments_lexer": "ipython3",
331-
"version": "3.7.3"
332-
},
333-
"toc": {
334-
"base_numbering": 1,
335-
"nav_menu": {},
336-
"number_sections": true,
337-
"sideBar": true,
338-
"skip_h1_title": false,
339-
"title_cell": "Table of Contents",
340-
"title_sidebar": "Contents",
341-
"toc_cell": false,
342-
"toc_position": {},
343-
"toc_section_display": true,
344-
"toc_window_display": false
331+
"version": "3.7.2"
345332
}
346333
},
347334
"nbformat": 4,

0 commit comments

Comments
 (0)