I'm a Starcraft 2 beginner (playing mainly Zerg) and encountered some situations where I ran into a much bigger army with an army of smaller size. This usually happens versus Protoss where they retreat a smaller army back to the big one (me following them stupidly) and they immediately reinforce at a nearby pylon.
My first reaction to this situation is to retreat and save as many units as possible. Slower units like the roach (without speed-upgrade) get easily sniped by stalkers. By the time I have roach-speed, stalkers can blink, resulting in a similar situation. Also, stimmed marines seem to be quite effective at taking out huge chunks of a fleeing army. I have the feeling that by running away I actually get away worse than if I had fought the enemy.
So the question is: How do I retreat properly? Is it viable to leave some units as bait and run with the rest of the army?