Question about Bayesian binary_sensor logic

I’m attempting to use the Bayesian binary_sensor integration to do some smarter presence detection. I’m confused about the logic for the prob_given_true property. Here’s a snippet from the examples:

  observations:
    - platform: 'state'
      entity_id: 'sensor.living_room_motion'
      prob_given_true: 0.4
      prob_given_false: 0.2

Which of these is a more accurate statement?

  1. If there’s motion in the living room there’s a 40% chance that I’m there.
  2. If I’m in the living room, there’s a 40% chance that motion is detected.

Also, what’s the plain English interpretation of prob_given_false?

There is a post on the forum by a statistics professor, with google sheets to explain. A simple search should find it.

Answering my own question through a lot of “guess and check” work…

The above config means “If I’m in the living room, there’s a 40% chance that motion is detected.”

And prob_given_false means “There’s a 20% chance that motion is detected and I’m not in the living room.”

(At least that seems to be the case. I think I need a Bayesian filter for my Bayesian filter answer.)