Skip to content

Commit 99c4f3d

Browse files
author
Hugo Bowne-Anderson
authored
Make small changes to Instructor NB1
1 parent f4d8a93 commit 99c4f3d

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

notebooks/01-Instructor-Probability_a_simulated_introduction.ipynb

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"source": [
114114
"# Computed how many people click\n",
115115
"clicks = x <= 0.5\n",
116-
"n_clicks = sum(pop)\n",
116+
"n_clicks = sum(clicks)\n",
117117
"f\"Number of clicks = {n_clicks}\""
118118
]
119119
},
@@ -411,9 +411,7 @@
411411
"cell_type": "markdown",
412412
"metadata": {},
413413
"source": [
414-
"**Note:** you may have noticed that the _binomial distribution_ can take on only a finite number of values, whereas the _uniform distribution_ above can take on any number between $0$ and $1$. These are different enough cases to warrant special mention of this & two different names: the former is called a _probability mass function_ (PMF) and the latter a _probability distribution function_ (PDF). Time permitting, we may discuss some of the subtleties here. If not, all good texts will cover this. I like (Sivia & Skilling, 2006), among many others.\n",
415-
"\n",
416-
"**HBA: should this note ^ have come earlier?** "
414+
"**Note:** you may have noticed that the _binomial distribution_ can take on only a finite number of values, whereas the _uniform distribution_ above can take on any number between $0$ and $1$. These are different enough cases to warrant special mention of this & two different names: the former is called a _probability mass function_ (PMF) and the latter a _probability distribution function_ (PDF). Time permitting, we may discuss some of the subtleties here. If not, all good texts will cover this. I like (Sivia & Skilling, 2006), among many others.\n"
417415
]
418416
},
419417
{
@@ -437,7 +435,9 @@
437435
"We have already encountered joint probabilities above, perhaps without knowing it: $P(A,B)$ is the probability two events $A$ and $B$ _both_ occurring.\n",
438436
"* For example, getting two heads in a row.\n",
439437
"\n",
440-
"If $A$ and $B$ are independent, then $P(A,B)=P(A)P(B)$ but be warned: this is not always (or often) the case."
438+
"If $A$ and $B$ are independent, then $P(A,B)=P(A)P(B)$ but be warned: this is not always (or often) the case.\n",
439+
"\n",
440+
"One way to think of this is considering \"AND\" as multiplication: the probability of A **and** B is the probability of A **multiplied** by the probability of B."
441441
]
442442
},
443443
{
@@ -652,13 +652,6 @@
652652
"**Homework exercise for the avid learner:** verify the above relationship using simulation/resampling techniques in one of the cases above."
653653
]
654654
},
655-
{
656-
"cell_type": "markdown",
657-
"metadata": {},
658-
"source": [
659-
"**TO-DO HBA: include Venn Diagram? Include mention earlier of probability AND being multiplication.**"
660-
]
661-
},
662655
{
663656
"cell_type": "markdown",
664657
"metadata": {},
@@ -829,7 +822,7 @@
829822
"name": "python",
830823
"nbconvert_exporter": "python",
831824
"pygments_lexer": "ipython3",
832-
"version": "3.6.1"
825+
"version": "3.6.6"
833826
}
834827
},
835828
"nbformat": 4,

0 commit comments

Comments
 (0)