Without giving the exact formula, it is based on the amount of damage they took compared to a combination of their Xenophobia, Militancy and Determination. Low racial scores will make them more likely to surrender. A lot of damage at once will have more impact than a similar amount of damage over a longer period.
Steve