Reading a two-way table
Every probability question built on a table is the same division: \[ P(\text{event})\;=\;\frac{\text{count in the cells that satisfy the event}}{\text{count in the group the question is drawing from}} . \] The numerator is rarely the hard part. The denominator is.
| Drives | Public transit | Cycles | Total | |
|---|---|---|---|---|
| Downtown office | 54 | 138 | 48 | 240 |
| Suburban office | 156 | 42 | 42 | 240 |
| Total | 210 | 180 | 90 | 480 |
The table above records how each of $480$ employees of one company travels to work.
Three phrasings, three different denominators, same table: “a randomly selected employee” $\rightarrow$ denominator $480$; “a randomly selected employee from the downtown office” $\rightarrow$ denominator $240$; “a randomly selected employee who cycles” $\rightarrow$ denominator $90$.
Using the table, find (a) the probability that a randomly selected employee cycles, and (b) the probability that a randomly selected employee works downtown and uses public transit.
(a) The whole company is the group being drawn from, so the denominator is $480$: $P=\dfrac{90}{480}=\dfrac{3}{16}=\boxed{0.1875}$.
(b) “And” means a single cell — the downtown row crossed with the transit column, which holds $138$ employees. The denominator is still the whole company: $P=\dfrac{138}{480}=\dfrac{23}{80}=\boxed{0.2875}$.
Chữ and chỉ một ô; chữ given (hoặc “of the”, “among”) đổi mẫu số sang một hàng hoặc một cột. Hai chữ này nằm cạnh nhau trong đề và trông rất giống nhau, nhưng một cái đổi tử số, cái kia đổi mẫu số. Khi đọc đề, gạch chân chữ chỉ nhóm được rút ra trước khi chạm vào máy tính.
Conditional probability — the denominator is the whole question
The notation $P(B\mid A)$ reads “the probability of $B$ given $A$”. Given $A$ means: throw away every row and column outside $A$, then work inside what is left.
\[ P(B\mid A)=\frac{\text{count}(A\text{ and }B)}{\text{count}(A)}, \qquad P(A\mid B)=\frac{\text{count}(A\text{ and }B)}{\text{count}(B)} . \] Same numerator, different denominator. They are equal only in the accident that $\text{count}(A)=\text{count}(B)$.
From the commuting table: (a) given that an employee works downtown, what is the probability that the employee uses public transit? (b) Given that an employee uses public transit, what is the probability that the employee works downtown?
(a) Stay inside the downtown row, total $240$: $P=\dfrac{138}{240}=\boxed{0.575}$.
(b) Stay inside the transit column, total $180$: $P=\dfrac{138}{180}=\dfrac{23}{30}\approx\boxed{0.767}$.
Both use the same $138$; the answers differ because the groups being drawn from differ.
A screening test was given to $200$ people. The results are recorded below.
| Positive | Negative | Total | |
|---|---|---|---|
| Condition present | 42 | 8 | 50 |
| Condition absent | 30 | 120 | 150 |
| Total | 72 | 128 | 200 |
Compare the probability that a person tests positive given the condition is present with the probability that the condition is present given a positive test.
Given the condition (row total $50$): $P=\dfrac{42}{50}=0.84$.
Given a positive test (column total $72$): $P=\dfrac{42}{72}=\dfrac{7}{12}\approx 0.583$.
The test catches $84\%$ of the people who have the condition, yet only about $58\%$ of positive results come from people who have it, because the “absent” row is three times as large and contributes $30$ false positives.
Đảo ngược điều kiện. Đề hỏi $P(\text{condition}\mid \text{positive})$ mà học sinh tính $P(\text{positive}\mid \text{condition})$ — cả hai đều là $42$ chia cho một con số trong bảng, nên kết quả nào cũng “có vẻ đúng”. Cách chặn: khoanh tròn nhóm đứng sau chữ given rồi viết tổng của nhóm đó xuống làm mẫu số trước, sau đó mới đi tìm tử số.
Complements, unions, and “at least one”
$P(\text{not }E)=1-P(E)$. $P(A\text{ or }B)=P(A)+P(B)-P(A\text{ and }B)$ — subtract the overlap once, or it is counted twice.
From the commuting table, find (a) $P(\text{does not cycle})$, (b) $P(\text{downtown or cycles})$, and (c) the probability that an employee works at the suburban office, given that the employee does not cycle.
(a) $1-\dfrac{90}{480}=\dfrac{390}{480}=\dfrac{13}{16}=\boxed{0.8125}$.
(b) $\dfrac{240}{480}+\dfrac{90}{480}-\dfrac{48}{480}=\dfrac{282}{480}=\dfrac{47}{80}=\boxed{0.5875}$. The $48$ downtown cyclists belong to both groups and must be removed once.
(c) The group is “does not cycle”, which has $390$ people; the suburban part of it is $156+42=198$. So $P=\dfrac{198}{390}=\dfrac{33}{65}\approx\boxed{0.508}$.
Cộng thẳng $240+90=330$ cho câu “or”. Bốn mươi tám người vừa ở downtown vừa đạp xe bị đếm hai lần. Hễ hai nhóm có thể giao nhau thì phải trừ phần giao — và trong bảng hai chiều, phần giao chính là một ô có sẵn, không cần tính gì thêm.
A proportion of a proportion
When the question gives percentages instead of counts, the safest move is to invent a convenient total and rebuild the table. Two rates that apply to different subgroups can never be averaged directly.
A gym has $800$ members. Forty-five percent of the members are enrolled in the class programme. Thirty percent of the enrolled members attend the evening session, and $5\%$ of the members who are not enrolled attend the evening session. If a member is selected at random, what is the probability that the member attends the evening session? Given that a member attends the evening session, what is the probability that the member is enrolled in the class programme?
Enrolled: $0.45\times800=360$; of these $0.30\times360=108$ attend.
Not enrolled: $800-360=440$; of these $0.05\times440=22$ attend.
Evening attenders: $108+22=130$, so $P=\dfrac{130}{800}=\boxed{0.1625}$.
Given evening attendance, the group is those $130$ people: $P=\dfrac{108}{130}=\dfrac{54}{65}\approx\boxed{0.831}$.
Đừng lấy trung bình hai tỉ lệ. Ở ví dụ trên, $(30\%+5\%)/2=17.5\%$ — sai, vì hai tỉ lệ đó áp lên hai nhóm lệch cỡ nhau ($360$ và $440$). Cách duy nhất không sai là dựng lại bảng bằng số người thật rồi mới chia. Nếu đề không cho tổng, tự đặt tổng là $100$ hoặc $1000$ — xác suất không phụ thuộc con số bạn đặt.
Working backwards to a missing count
If the question hands you a probability and hides a count, write the probability as a fraction with the unknown in it and solve. The denominator is decided first, exactly as before.
Of $500$ patients in a trial, $320$ received Treatment A and the rest received Treatment B. The probability that a patient who received Treatment A improved is $0.65$, and $285$ patients improved in total. Find the probability that a patient who received Treatment B improved.
Treatment A improvements: $0.65\times320=208$.
Treatment B improvements: $285-208=77$, out of $500-320=180$ patients.
$P=\dfrac{77}{180}\approx\boxed{0.428}$.
A jar contains only red and green marbles. The probability that a marble drawn at random is red is $\tfrac38$. After $12$ more red marbles are added, that probability becomes $\tfrac12$. How many marbles were in the jar originally?
Let $n$ be the original number of marbles; then $\tfrac38 n$ are red. Adding $12$ red marbles changes both counts: \[ \frac{\tfrac38 n+12}{n+12}=\frac12 \;\Longrightarrow\; \tfrac34 n+24=n+12 \;\Longrightarrow\; 12=\tfrac14 n . \] So $n=\boxed{48}$. Check: $18$ red out of $48$ is $\tfrac38$, and $30$ out of $60$ is $\tfrac12$.
Bẫy của dạng này là chỉ cộng vào tử số mà quên cộng vào mẫu số. Thêm $12$ viên bi đỏ thì tổng số bi cũng tăng $12$ — viết phân số ra giấy trước khi giải, đừng làm nhẩm. Ngược lại, nếu đề lấy bớt bi xanh thì tử số giữ nguyên còn mẫu số giảm.
Practice
Several questions below draw on the two tables that follow; each question names the table it uses.
Table 1. Fish caught in a lake survey, by species and tag status.
| Tagged | Untagged | Total | |
|---|---|---|---|
| Species X | 36 | 84 | 120 |
| Species Y | 54 | 76 | 130 |
| Total | 90 | 160 | 250 |
Table 2. Internet plan chosen by $640$ households.
| Basic | Standard | Premium | Total | |
|---|---|---|---|---|
| Urban | 48 | 132 | 180 | 360 |
| Rural | 112 | 108 | 60 | 280 |
| Total | 160 | 240 | 240 | 640 |