Basic Probability & Statistics
SLAM is at its core a probabilistic estimation problem: given noisy sensor data, what is the most likely state (pose + map) of the robot? Probability theory provides the rigorous language for reasoning under uncertainty.
Gaussian Distribution
The univariate Gaussian (normal) distribution with mean and standard deviation has probability density function:
SLAM states are multi-dimensional, so we use the multivariate Gaussian. For a random vector with mean and covariance matrix (symmetric positive definite):
The argument of the exponential, , is the Mahalanobis distance — a scale-invariant measure of how far is from the mean. In SLAM, the covariance encodes uncertainty: a large diagonal entry means we are uncertain about the -th component of the state.
Two properties make Gaussians the workhorse of estimation:
- Closure under linear maps: if , then is Gaussian with mean and covariance . This covariance propagation rule (, with replaced by a Jacobian for nonlinear maps) is how uncertainty flows through a SLAM pipeline — from pixel noise to triangulated-point covariance to pose covariance.
- Products of Gaussians are Gaussian (up to normalization), which is why Bayesian updates with Gaussian priors and likelihoods stay tractable — the algebra behind the Kalman filter.
Bayes’ Theorem
Bayes’ theorem is the engine of probabilistic SLAM. It relates the posterior (our belief about state given observation ) to the likelihood and prior :
In SLAM, is the robot pose (and map) and is the camera image (or feature observations). The prior comes from a motion model; the likelihood comes from an observation model. Recursive application of Bayes’ theorem — predict then update — is the basis of the Extended Kalman Filter (EKF-SLAM) and particle filters.
MAP and MLE
Finding the state that maximizes the posterior is Maximum A Posteriori (MAP) estimation:
When the prior is uniform, MAP reduces to Maximum Likelihood Estimation (MLE). For Gaussian noise models, MLE is equivalent to minimizing a sum of squared errors — which is precisely what bundle adjustment does.
From MLE to least squares (the key derivation)
Assume independent observations with Gaussian noise: , . The likelihood is a product, so its negative logarithm is a sum:
Maximizing the likelihood therefore equals minimizing the sum of squared Mahalanobis-weighted residuals. This one line connects probability to optimization: bundle adjustment, pose graph optimization, and factor graph inference are all MAP estimation with Gaussian noise, and the information matrix is exactly the weight each residual gets.
Common pitfalls
- Confusing likelihood and posterior: is a function of the state given fixed data; it does not integrate to 1 over .
- Ignoring correlations: treating as diagonal when errors are correlated (e.g., after marginalization) makes the estimator overconfident — a root cause of inconsistency in SLAM.
- Gaussian assumptions vs. outliers: a single wrong feature match violates the Gaussian noise model badly enough to corrupt the whole estimate, which is why robust kernels and RANSAC exist.
Why it matters for SLAM
The two dominant families of SLAM back-ends — filtering (EKF, particle filters) and smoothing (factor graphs, bundle adjustment) — are both direct applications of Bayesian estimation under Gaussian noise. Understanding Gaussians, Bayes’ theorem, and the MAP/MLE connection is what lets you see that a Kalman filter update and a least-squares solve are two views of the same underlying inference problem.