An unknown location \(\mathbf z\in\mathbb R^2\) has a Gaussian prior and is seen through Gaussian noise. The posterior is again Gaussian with precision \(\boldsymbol\Sigma_z^{-1}+N\boldsymbol\Sigma_y^{-1}\) (the prior precision plus one unit of sensor precision per observation), and its mean is a precision-weighted compromise between the prior mean and the data. In the sensor mode two sensors report different readings; each is trusted according to its own precision, direction by direction.
Mode 1 reproduces the setting of Figure 3.9: the true location is (0.5, 0.5) (black cross), the noise covariance is 0.1 [2 1; 1 1] and is known, the prior mean is 0. The data are the first N of 50 fixed draws, so adding points never moves the earlier ones. Mode 2 reproduces Figure 3.10 with a flat prior and the readings y₁ = (0, −1) and y₂ = (1, 0). Ellipses show one standard deviation.
code/ch03_probability_multivariate.py (bayes_rule_gauss, sensor_fusion, Figures 3.9 and 3.10).