← 💻 Computer Science

📊 MI Lab

Relationship
View
Shuffle Y (break link)
Live statistics
Pearson r:
r²:
Mutual info: bits
MI (independent baseline): bits
FPS:
Drag — rotate · Scroll — zoom

📊 Mutual Information: What Correlation Misses

A live 3D joint-distribution plot: reshape how two variables relate — linear, curved, circular or independent — and watch Pearson correlation and mutual information respond very differently to the same data.

🔬 What It Demonstrates

Correlation only detects straight-line trends and can sit at zero for strongly dependent variables (a quadratic curve, a ring). Mutual information, computed from the binned joint distribution, stays high in exactly those cases because it captures any reduction in uncertainty, not just a linear one.

🎮 How to Use

Pick a relationship shape, dial in noise and sample size, and compare the live r and mutual-information readouts. Hit "Shuffle Y" to destroy the dependency while keeping both marginal distributions identical — mutual information collapses even though nothing about either variable alone has changed.

💡 Did You Know?

Mutual information is zero if and only if two variables are truly statistically independent — unlike correlation, which can be zero for variables that are perfectly (but nonlinearly) related.