Skip to content
The Lumenary

Each worksheet prints cleanly on A4 or Letter. Answer keys are on a separate page.

The Lumenary · Grades 9–12

Conditional probability and independence

Name: ______________________

Date: ______________________

You will learn to

  • Compute conditional probabilities from two-way tables and tree diagrams, and use the multiplication rule
  • Decide whether events are independent, and distinguish independence from mutual exclusivity
  • Prove the rules of conditional probability, the law of total probability and Bayes' theorem from the definitions
  • Apply Bayes' theorem to diagnostic tests with base rates, using natural frequencies
  • Recognise the confusion of P(A∣B)P(A \mid B) with P(B∣A)P(B \mid A), including the prosecutor's fallacy
  1. 1.

    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?

    • A.14\tfrac14
    • B.16\tfrac16
    • C.136\tfrac{1}{36}
    • D.12\tfrac12
  2. 2.

    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?

    • A.3080=0.375\tfrac{30}{80} = 0.375
    • B.30200=0.15\tfrac{30}{200} = 0.15
    • C.30400=0.075\tfrac{30}{400} = 0.075
    • D.200400=0.5\tfrac{200}{400} = 0.5
  3. 3.

    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?

  4. 4.

    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?

    • A.About 16%16\% (180180 out of 11601160)
    • B.90%90\%
    • C.2%2\%
    • D.80%80\%, because the test is right 90%90\% of the time and wrong 10%10\%
  5. 5.

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

    • A.“The first die shows 33” and “the second die is even”.
    • B.“The total is 77” and “the first die shows 33”.
    • C.“The total is 88” and “the first die shows 33”.
    • D.“The first die is even” and “the total is even”.
    • E.“Both dice show 66” and “the total is 1212”.
  6. 6.

    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?

    • A.AA and BB are not independent, because P(A∩B)=0≠0.12=P(A)P(B)P(A \cap B) = 0 \ne 0.12 = P(A)P(B).
    • B.AA and BB are independent, because they have nothing to do with each other.
    • C.P(A∪B)=0.3+0.4−0.12=0.58P(A \cup B) = 0.3 + 0.4 - 0.12 = 0.58.
    • D.P(A∣B)=0.3P(A \mid B) = 0.3.
  7. 7.

    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?

  8. 8.

    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?

    • A.Step (1)
    • B.Step (2)
    • C.Step (3)
    • D.Step (4)
  9. 9.

    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?

    • A.It is needed so that μ.cond B A * μ.P A equals μ.P (B ∩ A), the step where the multiplication rule is used.
    • B.It prevents division by zero in μ.P B; without it Lean would crash.
    • C.None: it is decoration and could be deleted without changing anything.
    • D.It says that A and B are independent.
  10. 10.

    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.

    Computational — Practice

Code: Apache-2.0 · Content: CC BY-SA 4.0