A two-way frequency table shows how observations fall into both of two categories. To calculate probability from the table, identify the favorable count and divide it by the relevant total. The word given tells you to restrict the denominator to a particular group.

Read rows, columns and totals

Responses by group
GroupYesNoTotal
A181230
B102030
Total283260

Each interior cell belongs to one row and one column. For example, 18 people are in A and answered Yes. Row totals are30 and30; column totals 28 and32; grand total60. Assume each person is counted once and selected with equal probability.

Find joint and marginal probabilities

Joint means two conditions both hold: P(A and Yes) = 1860 = 310. Marginal means one condition, irrespective of the other: P(Yes) = 2860 = 715. Both use the grand total.

Use the right denominator for given

Given A, only A’s 30 people count. P(Yes given A) = 1830 = 35. Given Yes, restrict to the 28 people who answered Yes: P(A given Yes) = 1828 = 914. These are generally different. A conditional probability with a zero-count conditioning group is undefined.

Avoid double-counting an or event

A or Yes includes anyone who belongs to A, answered Yes, or both. Add totals and subtract the overlap: 30+28−18=40. P(A or Yes) = 4060 = 23. A complement means the opposite of an event, so P(not Yes) = 1−P(Yes).

Compare conditional probabilities to examine association

Compare the Yes proportion within each group using the row totals, not the raw Yes counts. In the first table, P(Yes given A) = 1830 = 60%, while P(Yes given B) = 1030 ≈ 33.3%. The observed Yes rates differ, suggesting association in this sample.

In a probability model, A and Yes are independent if knowing A does not change the chance of Yes: P(Yes given A) = P(Yes), when P(A) > 0. Equal sample proportions do not prove independence in a larger population; unequal sample proportions do not alone establish causation.

Examples

Example 1: Joint event

In a group of50, 8 people both take music and ride the bus. P(both) = 850 = 425.

Example 2: Conditional event

Of 24 members in group X, 6 prefer tea. P(tea given X) = 624 = 14.

Example 3: Union event

Of 80 people, 30 play soccer, 25 swim and 10 do both. Count soccer or swim = 30+25−10=45. Probability = 4580 = 916.

Video lessons

Two-way table probability calculator

Enter four nonnegative whole-number counts, then choose the event. The calculator builds row and column totals and uses the right denominator.

Exercises

Try the ten questions on your own. If an answer is not right, use the hint and try again before moving on.

Interactive practiceQuestion 1 of 10
In a table with grand total80, 12 belong to both A and Yes. Find P(A and Yes).
0 of 10 answered

Printable practice

Want to work on paper? These free worksheets include practice and an answer key.

Frequently asked questions

Do given A and given Yes use the same denominator?

Usually no. Use the count of the group after given.

Can I use percentages instead of counts?

Yes, consistently if they have the same base; selected-group percentages require matching denominators.

Does or include both?

Yes, unless explicitly stated otherwise.

Related topics