Conditional probability and independence
Warm-upHumanTwo fair dice are rolled and you are told that the total is . What is the probability that the first die shows a ?
Two fair dice are rolled and you are told that the total is . What is the probability that the first die shows a ?
In the lesson's survey of students in Hanoi, cycle to school, were late at least once, and cyclists were late. A student is chosen at random from those who were late. What is the probability that they cycle?
A condition affects of a population of people. A test detects it in of people who have it, and gives a false positive for of people who do not. If everyone is tested, how many positive results are expected?
With the numbers of the previous exercise (base rate , detection, false positives), a randomly chosen person tests positive. About how likely is it that they have the condition?
Two fair dice are rolled. Which pairs of events are independent? (Choose all that apply.)
Events and are mutually exclusive, with and . Which statement is true?
Two cards are drawn from a shuffled pack of without replacement. The probability that both are aces is . What is ?
Here is the proof that if and are independent then so are and :
.
Which step uses the hypothesis that and are independent?
In the lesson's Lean model, μ.cond A B is defined as μ.P (A ∩ B) / μ.P B, and Lean's convention makes x / 0 = 0. The lesson proves
theorem bayes (μ : FinProb Ω) (A B : Finset Ω) (hA : μ.P A ≠ 0) : μ.cond A B = μ.cond B A * μ.P A / μ.P B.
What is the role of the hypothesis hA?
Write posterior(prior, sensitivity, false_positive_rate) returning by Bayes' theorem, and after_positives(prior, sensitivity, false_positive_rate, k) returning the probability of after positive results from independent tests (use each posterior as the next prior). The tests pass Fractions, so keep the arithmetic exact.