BIOS 600 - Spring 2026
HW 1 due date Jan 27 at 11:59pm
Reminder: I have office hours Tuesdays 9:45-10:45am (MCG 3106E) and by appointment. TAs have office hours Fridays 3-4pm (Zoom : https://unc.zoom.us/my/hyunggyumin) & by appointment. Reach out if you need any support!
Free tutoring: by appointment, and office hours on Mondays 2-4, Wednesdays 2-4, Fridays 1-3, starting this Friday. Details on course website and Canvas.
Check what assignment you are submitting to!
For all assignments
Go from this:
to this:
\[ P(A|B) = \frac{P(A\cap B)}{P(B)} \]
Examples come up all the time in the real world:
We can rewrite the definition of conditional probability:
\[ P(A|B) = \frac{P(A\cap B)}{P(B)} \implies \underset{\text{Multiplicative Rule}}{P(A\cap B) = P(A | B) \times P(B)} \]
Question
What does the multiplicative rule mean in plain English?
Events \(A\) and \(B\) are said to be independent when
\[ P(A \cap B) = P(A) \times P(B) \]
or equivalently, \(P(A|B) = P(A)\) or \(P(B|A) = P(B)\)
Experiment: Toss a fair 6-sided dice two times. We assume the two tosses are independent from each other.
Let \(A\) = getting a 1 on the first toss. Let \(B\) = getting a 1 on the second toss.
What is \(P(A)\)?
What is \(P(B)\)?
What is the \(P(A \cap B)\)?
What is \(P(A | B)\) ?
What is \(P(B | A)\) ?
Definition: Two outcomes are disjoint or mutually exclusive if they cannot both happen.
For example: If we roll a die, the outcomes 1 and 2 are disjoint since they cannot both occur.
On the other hand, the outcomes 1 and “rolling an odd number” are not disjoint since both occur if the outcome of the roll is a 1.
| Coffee drinking | Died? Yes | Died? No | Total |
|---|---|---|---|
| None | 1039 | 5438 | 6477 |
| Med-Low | 4440 | 29712 | 29809 |
| High | 3601 | 24934 | 28535 |
| Total | 9080 | 60084 | 64821 |
What was the probability a randomly selected person in the study…
Question
In this study, were dying and coffee drinking independent events?
\[ P(A) = P(A \cap B_1) + P(A \cap B_2) + \cdots + P(A \cap B_k) \]
\[ \begin{aligned} P(A) &= P(A \cap B_1) + P(A \cap B_2) + \cdots + P(A \cap B_k) \\ &= P(A|B_1) P(B_1) + P(A|B_2)P(B_2) + \cdots + P(A | B_k)P(B_k) \end{aligned} \]
| Coffee drinking | Died? Yes | Died? No | Total |
|---|---|---|---|
| None | 1039 | 5438 | 6477 |
| Med-Low | 4440 | 29712 | 29809 |
| High | 3601 | 24934 | 28535 |
| Total | 9080 | 60084 | 64821 |
What was the probability a randomly selected person died? Let’s find this using the law of total probability.
In an introductory statistics course, 50% of students were undergrads, 40% were master’s students, and 10% were PhD students.
80% of the undergrads didn’t get enough sleep, 40% of the master’s students didn’t get enough sleep, and 10% of the PhD students didn’t get enough sleep.
What is the probability that a randomly selected student in this class didn’t get enough sleep? Are sufficient sleep status and year independent?
Let’s solve this using the Law of Total Probability…
What is the probability that a random person…
| Coffee drinking | Died? Yes | Died? No | Total |
|---|---|---|---|
| None | 1039 | 5438 | 6477 |
| Med-Low | 4440 | 29712 | 29809 |
| High | 3601 | 24934 | 28535 |
| Total | 9080 | 60084 | 64821 |
…was a high coffee drinker, given that they died?
…died, given that they were a high coffee drinker?
Are these two probabilities the same?
We can use Bayes’ rule to “reverse” the order of conditioning.
By definition:
\[P(A | B) = \frac{P(A \cap B)}{P(B)} = \frac{P(B | A) P(A)}{P(B)}\]
\[\begin{align} P(A | B) = \frac{P(A \cap B)}{P(B)} &= \frac{P(B | A) P(A)}{P(B)} \\ &= \frac{P(B | A) P(A) }{P(B | A) P(A) + P(B | A^C) P(A^C)} \end{align}\]
If instead \(A\) is partitioned into \(k\) mutually disjoint events that together comprise the entire sample space, Bayes’ rule gives:
\[\begin{align} P(A | B) &= \frac{P(B | A) P(A)}{P(B)} \\ &= \frac{P(B | A) P(A) }{P(B | A_1) P(A_1) + P(B | A_2) P(A_2) + \cdots P(B | A^k) P(A^k)} \end{align}\]
What is the probability that a random person in the coffee study…
| Coffee drinking | Died? Yes | Died? No | Total |
|---|---|---|---|
| None | 1039 | 5438 | 6477 |
| Med-Low | 4440 | 29712 | 29809 |
| High | 3601 | 24934 | 28535 |
| Total | 9080 | 60084 | 64821 |
Let’s verify our results using Bayes’ rule.
If we have the row and column totals, we can directly calculate these conditional probabilities from a table.
So, why would we even need Bayes’ rule?
There are many cases where you would not have row/column totals.
Imagine a scenario where a rare disease is being studied.
You may have detailed information about patients who tested positive for the disease (including their symptoms and demographics), but you might lack comprehensive data on the entire population’s symptom distribution or total number of people tested.
In this case, you wouldn’t have the full row or column totals, making it necessary to use Bayes’ Theorem to infer probabilities based on the available conditional probabilities and the prevalence of the disease.
This is common in situations where data is incomplete, either due to privacy concerns, lack of resources, or when dealing with emerging diseases.
Conditional probability, the multiplicative rule, and Bayes’ theorem
Disjoint vs. independent events
Law of total probability
Why is Bayes’ rule helpful?

Comment on Lab 1
Some confusion on question 2: “Explain what you think ### in front of text (not code) does.”
In front of code, # makes that line of code a comment, and that code does not run
In front of text, ### makes that text a heading
Markdown basics