You also have to consider factors like the terrain each unit is in (i.e., was one or both in "close" terrain like a city or forrest?), relative unit experience, "combat time" (which is kind of like rate of fire), and supply levels (if one unit runs low of supply it becomes very vulnerable). Advancing / attacking units often find themselves in hexes with low supply value, meaning they do not replentish as quickly as the defender, who may be in or adjacent to a friendly city or base. The attacker may be "stronger" but engaged units use supply very fast; the defender gets replenished quickly, but the attacker does not, which is what makes those supply trucks, FARPs, etc. so important

. The Combat Time factor was one I overlooked for a long time but turns out to be significant - some heavy-hitting units can be slow to "reload"; that is, they get fewer shots per day...
I think this is a really interesting topic and a very cool part of the game. The thread tkobo points to is, as far as I know, the most difinitive on the subject here. Experimentation is key, so please experiment and share what you see with us!