So I'm sad and bored...
I've taken a spread sheet of all my raids (raids only) over the last 90 minutes.
53 raids in total, so it's by no means conclusive, but it does seem to be logical.
I never raid anyone near my stats - 20% below or less.
I keep at least half my troop count in infantry at all times.
Of 53 raids I have lost:
48 Infantry
7 Ground
6 Air
1 boat
Total cost of losses: $152,300
1 lost Sea Hawk for 50 valor
Total gain: $ 210,361
Gained at lease 53 valor, probably nearer 65.
So it does pay to raid - sensibly - minimum payout $3,000 if less, walk away.
You do lose fewer troops the bigger the margin between you and oponent, but !!! I did lose the 50 valor Sea Hawk attacking someone with < half my stats, so it is pure random.
As the game progresses and we get bigger and bigger buildings, I assume the losses won't change so the raiding payout will grow and get more profitable.
Hope this helps - happy raiding.