A simple example
Belief: A probability distribution that models uncertainty over possible states X of the world
Suppose I roll a fair die, but don’t tell you the result X
Q1: What should your belief be about X?
A1: Prior: p(X=x)=⅙ for all x in {1, …, 6}
Q2: Suppose that now I look at X, and tell you that its value is even. What should your belief be now?
A2: Posterior (conditional): p(X=x|X in {2,4,6}) =
Key point: In this example, it is not the world that is changing, but rather our information about the world!
Remember: Beliefs model our state of knowledge of the world
Try it: update a belief
I roll a hidden die. Ask questions and watch your belief change. The die never changes; only what you know about it does.
Ask about the roll
Example: measure weight with imperfect scales
| Day | Measurement | Prediction | Estimate | Truth |
|---|---|---|---|---|
| 0 | - | - | -160.0 | 160.0 |
| 1 | 158.0 | 161.0 | 159.8 | 161.0 |
| 2 | 164.2 | 160.8 | ?1162.16 | 162.0 |
| 3 | 160.3 | ?2163.16 | 162.02 | 163.0 |
| 4 | 159.9 | 163.02 | ?161.77 | 164.0 |
| 5 | 162.1 | ?162.77 | 162.50 | 165.0 |
| 6 | 164.6 | 163.50 | 163.94 | 166.0 |
| 7 | 169.6 | 164.94 | 166.80 | 167.0 |
| 8 | 167.4 | 167.80 | 167.64 | 168.0 |
| 9 | 166.4 | 168.64 | 167.75 | 169.0 |
| 10 | 171.0 | 168.75 | 169.65 | 170.0 |
Try it: tune the filter
Same predict and update loop. Change how much you trust the scale and how fast you think the weight grows.
Filter settings
Measurements
2D Example
Tracking the constant velocity of an aircraft
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| 30171 | 30353 | 30756 | 30799 | 31018 | 31278 | 31276 | 31379 | 31748 | 32175 | |
| 30194.2 | 30383.64 | 30612.73 | 30818.93 | 31025.7 | 31242.3 | 31418.8 | 31566.3 | 31739.4 | 31964.1 | |
| 39.42 | 38.65 | 42.2 | 41.7 | 41.55 | 42.44 | 38.9 | 34.2 | 34.4 | 39.67 | |
| 30391.3 | 30576.9 | 30823.9 | 31027.6 | 31233.4 | 31454.5 | 31613.15 | 31737.24 | 31911.4 | 32162.45 | |
| 39.42 | 38.65 | 42.2 | 41.7 | 41.55 | 42.44 | 38.9 | 34.2 | 34.4 | 39.67 |
Try it: tune α and β
α sets how far a residual moves the position estimate; β sets how much it changes the velocity.
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|