← Statistics

Statistics

Two-Way Tables

Lesson

A two-way table cross-classifies a sample by two categorical variables. Once you see one, three kinds of probability fall out instantly.

Example table — 60 students

PlaysDoesn’tTotal
Boys201030
Girls151530
Total352560

Three kinds of probability

  • Marginal: probability of one category alone. From the margin (totals). P(boy)=30/60P(\text{boy}) = 30/60.
  • Joint: probability of BOTH categories at once. From a single cell. P(boy and plays)=20/60P(\text{boy and plays}) = 20/60.
  • Conditional: probability of one GIVEN the other. Restrict to the relevant row or column: P(playsboy)=20/30P(\text{plays} | \text{boy}) = 20/30.

Worked example — conditional flip

P(playsboy)P(\text{plays} | \text{boy}) uses the BOYS row (30 total):

P(playsboy)=2030=23P(\text{plays} | \text{boy}) = \frac{20}{30} = \frac{2}{3}

P(boyplays)P(\text{boy} | \text{plays}) uses the PLAYS column (35 total):

P(boyplays)=2035=47P(\text{boy} | \text{plays}) = \frac{20}{35} = \frac{4}{7}

Different conditionals from the same cell! The denominator shifts.

Inclusion–exclusion

P(A or B)=P(A)+P(B)P(A and B)P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B)

Subtract the overlap so you don’t double-count it.

Practice

Work through these. Stuck? Click Get a hint.

Warm-Up

Quick problems to get going.

Problem 1

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(plays)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{plays}) = ?

Problem 2

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(boy)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{boy}) = ?

Problem 3

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(girl)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{girl}) = ?

Problem 4

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(plays AND boy)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{plays AND boy}) = ?

Practice

Standard problems matching the lesson.

Problem 5

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(plays AND girl)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{plays AND girl}) = ?

Problem 6

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(doesn’t AND boy)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{doesn't AND boy}) = ?

Problem 7

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(plays | boy)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{plays | boy}) = ?

Problem 8

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(plays | girl)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{plays | girl}) = ?

Problem 9

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(boy | plays)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{boy | plays}) = ?

Problem 10

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(girl | plays)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{girl | plays}) = ?

Problem 11

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(doesn’t | boy)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{doesn't | boy}) = ?

Problem 12

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(coffee)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{coffee}) = ?

Problem 13

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(morning)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{morning}) = ?

Problem 14

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(coffee AND morning)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{coffee AND morning}) = ?

Problem 15

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(coffee | morning)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{coffee | morning}) = ?

Problem 16

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(morning | coffee)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{morning | coffee}) = ?

Problem 17

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(no coffee | evening)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{no coffee | evening}) = ?

Problem 18

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(evening AND no coffee)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{evening AND no coffee}) = ?

Challenge

Harder problems — edge cases, trickier numbers, multiple steps.

Problem 19

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(boy OR plays)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{boy OR plays}) = ?

Problem 20

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(girl OR doesn’t)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{girl OR doesn't}) = ?

Problem 21

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(coffee OR morning)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{coffee OR morning}) = ?

Problem 22

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.Are boy and plays independent? (1 = yes, 0 = no)\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ \text{Are boy and plays independent? (1 = yes, 0 = no)}

Problem 23

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(not plays)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{not plays}) = ?

Problem 24

Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.P(not coffee)=?\text{Table B: 100 people. Morning coffee 40 / no 20. Evening coffee 10 / no 30.} \\ P(\text{not coffee}) = ?

Problem 25

Table A: 60 students. Boys play 20 / don’t 10. Girls play 15 / don’t 15.P(doesn’t | girl)=?\text{Table A: 60 students. Boys play 20 / don't 10. Girls play 15 / don't 15.} \\ P(\text{doesn't | girl}) = ?

Ask the tutor

Stuck on a concept? Want another example? Ask anything about this topic.

Type your own question below, or tap one of the suggestions. The tutor can re-explain the lesson, work through a specific problem with you, generate fresh practice tuned to where you are, or check your reasoning.

Quiz

Test yourself on this topic →

10 questions, no hints. About 5 minutes.