Best practice for arming/disarming alarm based on 2-person presence tracking?

I use the Bayesian integration to calculate the probability of the house being occupied, based on about a dozen factors - phone location and motion detectors, obviously, but also time of day, is the TV on etc.

I wouldn’t claim this is best practice, but I’ve found it to be much more accurate than simple device tracking - it takes into account forgotten phones, for example.

There’s an excellent howto post here, complete with an interactive spreadsheet to help with the calculations.