Back

Mutual information of a bivariate Gaussian

What you are seeing: the joint probability density of two correlated Gaussian random variables XX and YY. The heatmap is p(x,y)p(x, y). The curves on the top and right are the marginals p(x)p(x) and p(y)p(y). The number I(X;Y)I(X; Y) in the corner measures how much knowing XX reduces your uncertainty about YY. It is zero when XX and YY are independent and grows without bound as they become perfectly correlated.

For a 2D Gaussian with correlation ρ\rho there is a clean closed form: I(X;Y)=12ln(1ρ2).I(X; Y) = -\tfrac{1}{2}\,\ln(1 - \rho^2). Slide ρ\rho to see how the heatmap stretches along the diagonal and how II rises. We compute the same quantity numerically by trapezoidal integration on the same grid and report both numbers; they agree to a few percent at the default resolution.

Figure 1. Joint density p(x,y)p(x, y) of a bivariate Gaussian with correlation ρ\rho. Top: marginal p(x)p(x). Right: marginal p(y)p(y). Method: analytic pdf on a 96 x 96 grid; differential entropies by trapezoidal sums.
rho0.600
sigma_x1.00
sigma_y1.00

WHAT TO TRY

  • Vary each control and watch the rail readouts respond.
  • Compare the diagnostic plot against the live scene.