The 2:1 odds refer to the numbers you put in the corresponding gov't combat odds. They are calculated by adding the strenght value of each individual ships allied together versus the value of each hostile ship. I said 2:1 but it can be anything really.
Here's an example: let's say you put a value of 50 in one gov't's combat odds. That means that will attack enemies as long as they are no less than 50% of the total strenght of their enemies. So, let's say that 50% gov't has a few ships whose added strenght give a total of 200. Then if those ships met a total strenght over 400 in hostile ships, they would flee. If they had a value of 200 in combat odds, then with 200 strenght they would flee if they met any more than 100 total hostile strenght. Etc.
That strenght I'm talking about is litterally the strenght value in the ship ressource. It's a rather abstract number that has to be adjusted correctly or it will lead to weird combat behavior. Why? Because like I said in my earlier post, I've noticed that when attacking each other, the AI tends to focus on the ship with the highest strenght value. That's why you'll notice that when a Fed carrier and a pirate carrier duke it out, often there will remain lots of fighters at the end. That's not always the case because they can be caught in the crossfire, but often you'll notice they really are firing at the carriers and it's just too bad for the fighters because they are in-between.
However, we'll also notice those carrier ships will react when fired at by those fighters. And that's where things start being weird. First, I'm pretty sure many have noticed the wierd movement they start taking when hit by multiple small ships? They tend to fly with some spontaneous random movements. That's because they keep changing their targets because of the damage they're taking.
So yeah, I believe there might be some more calculations behind all that, but overall, I'm fairly sure they aim for the strongest ship first in a hostile group, and when taking fire, they will go for the source of that damage. There could be some sort of timer. Example, for X frames after taking a hit, they will focus on that ship. However, if they do not receive anymore damage by the end of X frames, they will return to attacking the most threatening ship, the one with highest strenght value.
To test this, one might want to create a small plug with just one system, two gov't hostile to each other with like 1 in maximum odds so they won't flee unless there are a hundred times more strenght in the enemy team, basically making them next to fearless. Then make a few missions that make ships enter the system. Give those few ships so very clearly different strenght values, speeds and attack speed. But I'm too lazy right now.