There is some random variation, so if you're losing about 10% that's more or less normal. If they're attacking you and you lose consistently it's because you've wasted time upgrading defense buildings, and your defense is not really 162k.