I don't think there is any hard and fast rule to such an encounter... I wouldn't want to find out how weak my martial arts foo is in a situation like that unless I had absolutely no other option, and I was sure the situation was going to turn violent.
My advice to winning a violent encounter is avoiding the fight to begin with. Paying attention to your surroundings, and getting a 'vibe' for whats going on around you, ahead of you, and behind you gives you an edge... Being aware as well as self confident generally makes you a less desirable target for someone intent on making you a victim. Having said that, its not always possible to avoid such an encounter...
If you are in such an encounter, I would try to keep your cool as much as possible and assess the situation as best as you can. If there is any chance that complying up to a certain point is going to de-escalte the situation, than by all means comply if it means giving up your wallet, car keys or whatever. If the encounter turns into something where someone is trying to get you into a car, or move to a more isolated area, all bets are off... I don't think there is anything you own that is worth the price of being shot, and can probably be replaced at some point in time, but if someone has alterior motives and is trying to get you into a position to further escalate the attack, I think the odds are higher that the probability of violence being used has gone up dramaticly. If pride or machismo is going to make you step-up and try taking on someone with a gun, you are one step closer to being a darwin award nominee in my mind...
If the situation goes t*ts up, and it looks like violence is going to occur, my first choice would be to create distance between you and the attacker, as well as bringing in the use of cover... putting anything between you and the attacker whether it means a telephone pole, tree, newspaper rack or whatever increases the chance of getting out of the situation. I would also try and make as much of a commotion as possible to draw attention to your situation as possible, and get the hell out of there...
If you have no other choice other than to go to blows, realize you are fighting for your life and act accordingly. I always carry a pocket knife, and that would be my first choice (unless I had a CCW and a firearm, obviously) using one hand to block the weapon or knock it off axis, while attacking with the knife to the most vulnerable, lethal target open to attack depending on position of the attacker. If a knife is not available, time to improvise! A pen, keys, a piece of wood or rock laying on the ground, anything to increase your hit points...