In the case of cavalry vs. longbow or pike, don't underestimate the value of stacking defensive bonuses. You might look at the respective unit

values and think that a 15

cavalry should never struggle against a 6

unit, but large bonuses make a
big difference. Also don't overestimate the value of certain promotions - Combat gives a Cavalry unit as much of a strength boost as a promotion like Shock or Cover takes away from a defending Pike or Longbow, but Combat works regardless of what unit is being attacked whereas the unit-specific promotions only apply if you're actually fighting that specific unit. Which in many cases you won't end up doing since the best defender against a specific attacking unit will always defend the stack.
In the case of early barbarian fights, particularly against Archers (although this also applies to the cavalry vs. longbow situation to some extend), be aware that First Strike can be very painful and the game doesn't necessarily know how to calculate it's effect on combat odds properly. Also note that
very low difficulties actually give you a number of free Mulligan fights against barbarians, where even if you pit your warrior against a barbarian tank you'll still win. This bonus mostly exists to save your initial scout/warrior from being eaten by a stray animal, but it never goes away either, so if you never fight barbarians in the early game you can end up doing some really silly stuff with it.