Skip to content
The Lumenary

Practice · Grades 9–12

Conditional probability and independence

Conditional probability and independence

Warm-upHuman

Two fair dice are rolled and you are told that the total is 99. What is the probability that the first die shows a 55?

Choose one

Conditional probability and independence

Warm-upHuman

In the lesson's survey of 400400 students in Hanoi, 200200 cycle to school, 8080 were late at least once, and 3030 cyclists were late. A student is chosen at random from those who were late. What is the probability that they cycle?

Choose one

Conditional probability and independence

CoreHuman

A condition affects 2%2\% of a population of 10 00010\,000 people. A test detects it in 90%90\% of people who have it, and gives a false positive for 10%10\% of people who do not. If everyone is tested, how many positive results are expected?

Conditional probability and independence

CoreHuman

With the numbers of the previous exercise (base rate 2%2\%, 90%90\% detection, 10%10\% false positives), a randomly chosen person tests positive. About how likely is it that they have the condition?

Choose one

Conditional probability and independence

CoreHuman

Two fair dice are rolled. Which pairs of events are independent? (Choose all that apply.)

Choose all that apply

Conditional probability and independence

CoreHuman

Events AA and BB are mutually exclusive, with P(A)=0.3P(A) = 0.3 and P(B)=0.4P(B) = 0.4. Which statement is true?

Choose one

Conditional probability and independence

CoreHuman

Two cards are drawn from a shuffled pack of 5252 without replacement. The probability that both are aces is 1N\dfrac{1}{N}. What is NN?

Conditional probability and independence

StretchHuman

Here is the proof that if AA and BB are independent then so are AA and BcB^c:

P(A∩Bc)=(1)P(A)−P(A∩B)=(2)P(A)−P(A)P(B)=(3)P(A)(1−P(B))=(4)P(A)P(Bc)P(A \cap B^c) \overset{(1)}{=} P(A) - P(A \cap B) \overset{(2)}{=} P(A) - P(A)P(B) \overset{(3)}{=} P(A)\big(1 - P(B)\big) \overset{(4)}{=} P(A)P(B^c).

Which step uses the hypothesis that AA and BB are independent?

Choose one

Conditional probability and independence

StretchFormal

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?

Choose one

Conditional probability and independence

StretchComputational

Write posterior(prior, sensitivity, false_positive_rate) returning P(D∣positive)P(D \mid \text{positive}) by Bayes' theorem, and after_positives(prior, sensitivity, false_positive_rate, k) returning the probability of DD after kk positive results from independent tests (use each posterior as the next prior). The tests pass Fractions, so keep the arithmetic exact.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.