Something I've been looking at recently is the following. When I'm deciding on whether or not to take a shot I look at the worst shot possible especially if any of my other troops are nearby or there is a wall etc.
https://www.ufopaedia.org/index.php?title=Accuracy_formulaBased on the above link and attached picture I can see that the worst shot is roughly 18 degrees off target but something I'm not sure on is how does the ai decide when you miss whether you miss to the left or right of the intended target or is it just 50% either way.