1. Joint and marginal probability
The joint probability , also written , is the chance that both events happen. For two variables taking a few values, the joint probabilities fill a table; the whole table adds to 1.
The marginal probability of one event is found by summing the joint probabilities over the other variable: In a table, marginals are the row and column totals (written in the margins, hence the name).
| 0.1 | 0.3 | 0.4 | |
| 0.2 | 0.4 | 0.6 | |
| 0.3 | 0.7 | 1 |
and are independent only if every cell equals the product of its row and column totals. Here , so they are dependent. One failing cell is enough to show dependence.