Well, the higher the chance you have to win, the less troops you'll lose if you win. Let's say I have a 20-30% chance to win an attack. If I win I lose around 2500 troops, and if i lose I'll lose around 3000 troops. All depends on the building type and number of troops you have.