Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Source

Robots are never certain. Probability is the language we use to say how uncertain they are, and to update that uncertainty as evidence arrives. This section covers the minimum needed for the rest of the book; Thrun et al., 2005 treats the subject in depth.

Discrete random variables

A discrete random variable XX takes values from a finite set. Its probability mass function assigns a probability to each value:

P(X=x)0,xP(X=x)=1P(X = x) \ge 0, \qquad \sum_x P(X = x) = 1

For example, the type of the next vessel arriving at a washing station might follow this PMF:

<Figure size 770x396 with 1 Axes>

The law of large numbers

The sample frequencies approach the true probabilities as the number of samples grows. This is why simulation is a valid tool for reasoning about uncertainty:

<Figure size 770x396 with 1 Axes>

Continuous random variables and the Gaussian

Positions, distances, and angles are continuous. We describe them with a probability density function p(x)p(x), whose integral over an interval gives a probability. The most important density in robotics is the Gaussian (normal) distribution:

N(x;μ,σ2)=12πσ2exp ⁣((xμ)22σ2)\mathcal{N}(x;\,\mu,\sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)

It is fully described by its mean μ=E[X]\mu = \mathbb{E}[X] and variance σ2=E[(Xμ)2]\sigma^2 = \mathbb{E}[(X-\mu)^2]. About 68% of the probability lies within μ±σ\mu \pm \sigma, and about 95% within μ±2σ\mu \pm 2\sigma.

sample mean 2.010, sample std 0.303, fraction within 1σ: 0.669
<Figure size 770x396 with 1 Axes>

Joint and conditional probability

With two random variables we care about how they relate. The conditional probability of AA given BB is

P(AB)=P(A,B)P(B)P(A \mid B) = \frac{P(A, B)}{P(B)}

Rearranged, this is the product rule P(A,B)=P(AB)P(B)P(A, B) = P(A \mid B)\,P(B). Together with the sum rule P(A)=bP(A,B=b)P(A) = \sum_b P(A, B=b), it is all we need to derive Bayes’ rule in Section 2.3.

References
  1. Thrun, S., Burgard, W., & Fox, D. (2005). Probabilistic Robotics. MIT Press.