Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> On the right, we've got two functions of 'b' (R^2->R), ... presumably evaluated at the value 'b'. ... An alternative is that we're not really evaluating those two functions at 'b',

You're right the first time. The formula holds for all possible values of 'b' (and all possible 'a'), but as you said, we evaluate it at one particular 'b'. In the case of the Kalman filter, this is the particular position at which the sensor detected the object (and 'B' is the random variable of possible positions where the sensor was likely to have detected the object, given what we knew before we observed 'B'). As a reminder, 'A' the actual position of the object and its PDF represents our belief of where it could before we observe it.

> On the right, we've got two functions of 'b' ... Both of those evaluations give scalars

This is not true. The expression P_[B|A=a](b) depends on both 'a' and 'b'. This is the probability density that the sensor detects the object at 'b' given that it's really at 'a', so it's large if 'b' is approx equal 'a' and small if 'b' is far from 'a'. In other words, it depends on 'a' because, if you knew for sure where the object was, then that would affect your belief of where the sensor is likely to detect it.

The 'a' is tucked away in a subscript because this is only a PDF with respect to 'b' i.e. if you choose any 'a' you like and integrate over 'b' then you get 1, but if you choose 'b' and integrate over 'a' then you could get anything. Overall, it's still a function of 'a' and 'b' i.e. over R^6.

So in Bayes formula, when we fix a specific 'b', P_[B|A=a](b) becomes just a function of 'a'. It is large when 'a' is close to that specific 'b', and small when 'a' is far away from it. It's not a coincidence that I said something similar earlier, but with 'a' and 'b' the other way round.

In the Kalman filter: P_[B|A=a](b) is a function over 'a' that has a peak where the object was detected. P_A(a) has a peak where you thought the object was last time (but the peak is now slightly less concentrated near this point, because it might have moved). When you multiply these two functions, you end up with a single peak that is somewhere in between those two. This is a Gaussian PDF except for the fact its integral isn't 1, so we multiply by a constant so that it does become 1. Which leads to ...

> The denominator has P_[B](b), which looks like a function from R^2->R (the PDF of B in measurement space). I guess it could also mean that PDF evaluated at the specific value of b. However, I think it's actual value is supposed to be "the integral from negative to positive infinity in all directions of whatever is in the numerator"

Yes, it is the PDF of B evaluated at 'b'. And it is also the integral of the numerator. That's because those two things are equal; you're applying another formula:

P_[B](b) = \int P_[B|A=q](b) P_[A](q) dq

I chose a different symbol for the variable you're integrating over to stress that it's not really the same as the candidate value 'a' used in Bayes formula. This formula holds for all possible 'b', and even for all pairs of random variables. It's sometimes called the multiplication rule for conditional probability.

This formula doesn't get so much attention because it's less subtle. While Bayes formula is working backwards from evidence to the root cause, this is going forward from the root cause 'A' (position of object) to the effect B|A=q (detection given position of object) to B (overall possible detections, given all possible places the object could be).



One small extra detail about this quantity:

P_[B|A=a](b)

As I said before, in Bayes theorem, we fix a particular 'b' and let 'a' vary, so it's just a function of R^3. I just wanted to point out that the name for this is the likelihood function.

(If on the other hand we had fixed 'a' and let 'b' vary, then it would just be a PDF; specifically it's the PDF of the random variable B|A=a.)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: