As far as I understand, it works like this...
Defense mod>>Mitigation>>armor/resists.
The defense +# determines your likelihood of getting hit, and a high defense mod means you will rarely get hit. Following this, the damage range, if you ARE hit, will be reduced by mitigation, giving you a range of damage that you can be hit with. Following this, the value of the damage has the % resists of the armor you are wearing applied to it.
So, example time again. I fire my scatter pistol with 100-200 damage at a character with ranged damage mitigation 2, and he is also wearing armor with a 30% acid resist. Let us ignore the ranged defense mods, because we are ASSUMING that this attack connects. The 100-200 range is now reduced to a 100-140 damage range, so let's assume we hit for 130. This 130 damage hits the armor with a 30% acid resist, so we take 30% off of our total hit value, leaving us with 91, which is the final damage done to the character.
The only reason I am sure of this is because as of yesterday I was clueless about how mitigation interfaced with defense mods and armor and how they worked mathematically, so I searched all through the dev tracker and game guides on the official forums and found all this info from the horse's mouth.