Contingency Tables are one way to organise data. Here is a data summary of computer users in a group.
PC | Mac | Row Totals | |
Male | 45 | 38 | 83 |
Female | 40 | 55 | 95 |
Column Totals | 85 | 93 | 178 |
Joint Probability
What is the joint probability of Female and Mac?
First, the answer: go to the cell at the junction of Female and Mac, i.e., 55 and divide by the total. 55/178 = 0.309.
Now the theory:
P (F AND Mac) = P(F | Mac) x P(Mac)
P(F | Mac) = 55/93
P(Mac) = 93/178
P (F AND Mac) = (55/93) x (93/178) = 55/178 = 0.309.
PC | Mac | Row Totals | |
Male | 45/178 = 0.25 | 38/178 = 0.21 | |
Female | 40/178 = 0.22 | 55/178 = 0.31 | |
Column Totals |
Conditional Probabilities
Conditional probability is the probability that an event occurs, given another event has happened. Given that a customer is female, what is the probability she’ll purchase a Mac?
The answer is female-Mac cell (55) and divide it with the female row total (95). 55/95 = 0.58.
PC | Mac | Row Totals | |
Male | P(P|M) 45/83 | P(M|M) 38/83 | 83 |
Female | P(P|F) 40/95 | P(M|F) 55/95 | 95 |
Column Totals | 85 | 93 | 178 |
PC | Mac | Row Totals | |
Male | P(M|P) 45/85 | P(M|M) 38/93 | 83 |
Female | P(F|P) 40/85 | P(F|M) 55/93 | 95 |
Column Totals | 85 | 93 | 178 |