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}) = p(X=x)p({2,4,6})=1/3

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

p(X) X A blue dice cup tipped over next to two dice
1

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

    2

    Example: measure weight with imperfect scales

    A person standing on a bathroom scale
    Day 0Day 1Day 2Day 3Day 4Day 5Day 6Day 7Day 8Day 9Day 10
    Initialization!
    Question: What are Day 2’s Estimate & Prediction for Day 3?
    Question: What are Day 4’s Estimate & Prediction for Day 5?
    DayMeasurementPredictionEstimateTruth
    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
    Predict:
    prediction = estimate + gain_rate * time_step
    Sensor reading:
    measurement
    Update:
    estimate = prediction + 410(measurement − prediction)
    Giving:
    gain_rate = 1.0 lb/daytime_step = 1.0 day
    3

    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

    4

    2D Example

    Tracking the constant velocity of an aircraft

    A radar dish tracking an aircraft at two times, t1 and t2, along a straight line
    x˙=v=dxdt
    n12345678910
    zn30171303533075630799310183127831276313793174832175
    xˆn,n30194.230383.6430612.7330818.9331025.731242.331418.831566.331739.431964.1
    x˙ˆn,n39.4238.6542.241.741.5542.4438.934.234.439.67
    xˆn+1,n30391.330576.930823.931027.631233.431454.531613.1531737.2431911.432162.45
    x˙ˆn+1,n39.4238.6542.241.741.5542.4438.934.234.439.67
    ?
    ?
    ?
    ?
    Δt=5s
    xˆ0,0=30,000m
    Predict:
    xˆn,n−1=xˆn−1,n−1+Δtx˙ˆn−1,n−1
    x˙ˆn,n−1=x˙ˆn−1,n−1=40m/s
    State Update Equation
    α=0.2
    β=0.1
    xˆn,n=xˆn,n−1+α(zn−xˆn,n−1)
    x˙ˆn,n=x˙ˆn,n−1+β(zn−xˆn,n−1Δt)
    znMeasurement at time n xˆn,nEstimation of x at time n xˆn+1,nPrediction of x at time n
    xˆ1,0=30,200m
    x˙ˆ1,0=40m/s
    5

    Try it: tune α and β

    α sets how far a residual moves the position estimate; β sets how much it changes the velocity.

    n12345678910
    zn
    xˆn,n
    x˙ˆn,n
    xˆn+1,n
    x˙ˆn+1,n
    6