Two binary variables and have the joint distribution and . What is the mutual information in bits, and what would it be if and were independent?
Probability and statistics, Information theory
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can compute mutual information from a joint table as a KL divergence from the product of the marginals.
Key idea
.
Steps
- Find the marginals. , and the same for , and . So in every cell.
- Diagonal cells: , ratio , so each contributes .
- Off-diagonal cells: , ratio , so each contributes .
- Add the four terms: . So bits.
- If independent, in every cell, every log is , and .
- Check: the answer should be below bit, which it is.
Common mistakes
- Using the joint entries instead of the ratio inside the logarithm.
- Forgetting that negative log terms are allowed. Only the total is non-negative.
- Using natural logs while quoting bits.
How long your answer should be
Half a page, 3 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probability and statistics: Let and on three outcomes. Compute , the cross-entropy , and both and in bits. What do the numbers show?
Next in Probability and statistics: A classifier's accuracy is measured on independent random splits, giving a sample mean of and sample standard deviation of . Give a 95% confidence interval for the true mean accuracy, using . Why not use ?