Discrete probability
Diperkenalkan| English | Makna |
|---|---|
| sample space/ˈsæmpl speɪs/ | The set of all possible outcomes of a random experiment. |
| event/ɪˈvent/ | An occurrence detected by a program that can trigger a response. |
| conditional probability/kənˈdɪʃənl ˌprɒbəˈbɪlɪti/ | The probability of an event given that another event has occurred. |
| Bayes' theorem | A rule relating a conditional probability to its reverse conditional probability and prior probabilities. |
| independent/ˌɪndɪˈpendənt/ | Describing quantities, events or choices that do not depend on one another in the relationship being considered. |
| prosecutor's fallacy | prosecutor's fallacy |
A positive test, but how worried should you be?
- A disease affects 1 in 100 people. A test catches 90% of cases and clears 90% of healthy people. Your test is positive. Is the chance you are ill 90%?
- It is about 8%. Discrete probability, which is counting over equally likely outcomes, shows why.
Sample spaces and counting
- The sample space 样本空间 $\Omega$ is the set of all outcomes; an event 事件 is a subset. If every outcome is equally likely, $P(E) = \frac{|E|}{|\Omega|}$.
- Two fair dice give $6 \times 6 = 36$ pairs. Six pairs sum to 7, so $P(\text{sum} = 7) = \frac{6}{36} = \frac{1}{6}$. Two pairs sum to 11, so $P(\text{sum} = 11) = \frac{2}{36}$.
Two fair dice: what is P(sum = 7 or sum = 11)?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
6 pairs sum to 7 and 2 pairs sum to 11; the events do not overlap, so 8 of the 36 pairs.
Conditioning shrinks the world
- Conditional probability 条件概率: $P(A \mid B) = \frac{P(A \cap B)}{P(B)}$. Keep only the outcomes in $B$, then ask what fraction of them are also in $A$.
- Two dice, given the first shows 6: the world shrinks to 6 pairs. One of them, (6, 1), sums to 7, so $P(\text{sum} = 7 \mid \text{first} = 6) = \frac{1}{6}$.
Two fair dice. Given that the sum is 4, what is the probability that both dice show 2? Give a decimal to 3 places.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
The sum-4 world is (1,3), (2,2), (3,1): 3 outcomes, one of them (2,2), so 1/3.
Bayes' theorem on the test
- Bayes' theorem 贝叶斯定理: $P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B)}$. The tree finds $P(B)$: add every branch that ends in $B$.
- Ill and positive: $0.9 \times 0.01 = 0.009$. Healthy and positive: $0.1 \times 0.99 = 0.099$. Only the positive branches stay, rescaled:

A disease affects 2%. A test catches 95% of cases and gives a false positive for 5% of healthy people. What is P(ill | positive), in % to 1 decimal place?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
Ill and positive: 0.95 × 0.02 = 0.019. Healthy and positive: 0.05 × 0.98 = 0.049. 0.019 ÷ 0.068 ≈ 0.279, so about 27.9%.
Independence
- $A$ and $B$ are independent 独立 if $P(A \cap B) = P(A)\,P(B)$, so knowing $B$ does not change $P(A)$. Two dice are independent: $P(\text{both } 6) = \frac{1}{6} \times \frac{1}{6} = \frac{1}{36}$.
- Draws without replacement are not independent. Two aces from a 52-card deck: $\frac{4}{52} \times \frac{3}{51} = \frac{1}{221}$, because the first draw changes the deck.
Drawing two cards from a deck without putting the first back gives independent draws.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
The first card changes what is left, so the second probability depends on it.
Two cards are drawn without replacement from a 52-card deck. The probability that both are aces is 1/N. What is N?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
4/52 × 3/51 = 12/2652 = 1/221.
The prosecutor's fallacy
- $P(A \mid B)$ and $P(B \mid A)$ are different numbers. "A healthy person rarely tests positive" (10%) is not "a positive person is rarely healthy" (here, about 92% are healthy).
- Swapping them is the prosecutor's fallacy 检察官谬误. Bayes converts one into the other; it never swaps them for free.
For the 1% disease test in this lesson, match each probability to its value.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
The test's own rates condition on health; the patient's question conditions on the result. Bayes links them.
Marks that slip away
- Unequal outcomes counted as equal. The sums 2 to 12 are not equally likely; count the 36 pairs instead.
- Multiplying dependent events. $P(A)P(B)$ works only when $A$ and $B$ are independent.
- Ignoring the base rate. A rare condition stays fairly unlikely after one imperfect test.
You've got it
- Equally likely outcomes: $P(E) = |E| / |\Omega|$, so counting does the work.
- $P(A \mid B) = P(A \cap B)/P(B)$; Bayes: $P(A \mid B) = P(B \mid A)P(A)/P(B)$, with $P(B)$ from the tree.
- Independence means $P(A \cap B) = P(A)P(B)$; never swap $P(A \mid B)$ and $P(B \mid A)$.