Do not get mugged in the first place.
The following information comes from Marc McYoung and I found it very convincing and informative. The tips are also usable to avoid theft or rape.
A criminal needs (a) a victim and (b) to get near the victim
From (a) we know that if there are too many people, we are relatively safe. The danger of a safe escape is diminished, people are likely to help, identify or track the attacker, all in all it is too risky for mugging. But you are also relatively safe in the woods because there are not enough people. Criminals do not like to wait hours and hours for a victim.
So criminals will be found in what Marc called "fringe" or "transit" areas: Areas where people will pass through, but lonely and outside immediate help.
We all know such areas: Parking lots, long staircases, side roads, main roads at night, ATMs, malls outside opening times, washing centers. We are not inside the area to do something, but to get from one location to another location.
So the next step is how to identify an attacker.
In a fringe zone normal people are focused on the task to get to their location. You are searching for your car and put out the keys, you are smoking in the open staircase with another smoker or, if alone, looking bored, you are putting out your wallet to get money from the ATM, you are looking for street signs, you are preparing your laundry.
And you are going in a less or more straight way to your destination and worse, you are distracted because you are mentally switching already on your destination.
A criminal lacks all this signs because he is waiting for a victim.
You do not loiter in a transit area, you do not wait there. If you spot someone especially in the beginning or ending area of a transit zone and you cannot tell what he/she is doing there, there is something wrong. The beginning and ending is important because criminals set up traps (moving behind you to avoid escape, possibly setting you up for a pincer move with an accomplice) and they want to leave the area fast / have an excuse (I just wanted to leave/enter...).
Now to (b).
The criminal still need to get near to you and if possible, he/she wants to "interview" you (Is the victim uncautious ? Trained ? Armed ?). So if you are in a fringe zone and someone wants to get near to you: You have nothing. You have no change, you have no mobile phone to lend, you do not know the way to whatever, you cannot help because you are injured. LIE if necessary! Screw your hospitality (especially for women) - people can have hurt feelings all the time and may insult you, but it is simply bad luck that he/she
is in an fringe zone and if he/she is nice, they can wait quietly outside immediate reach.
Watch out if the person has his hands open and easily visible. If the hands slip out of your sight and stay there, something is very wrong. If someone still tries to enter your vicinity, IT IS AN ATTACK!
The other option is the typical out-of-the-bushes-assault: "Well, if my paper trail amounts to...HOLY SH..". To avoid this, you are going on the wrong side of the sidewalk, so cars driving in your direction uses the other side. You are warned if collision is possible and the risk of a drive-by attack (stopping the car behind/before you and jump out) is greatly reduced.
If you see possible hiding places, go around them, even if you need to go in the middle of the road. (You can stay there, if the road is completely deserted and both sides are very dark).
If the street has lamps in greater distances, squeeze one eye shut in the lighted areas to retain night vision in the dark areas.
I cannot fully cite the wealth of information available, but I think that I talked about the most important points.