A few things would factor into that situation:
1. If you pull out your gun to shoot with intent to stop the threat, you are going to have a major adrenaline dump into your bloodstream, making taking your time to aim almost impossible. Even if you train at a range every single day, it's not going to prepare you for a life or death situation such as this.
2. A single .22 round isn't going to have much stopping power or cause a lot of damage. As Merad said, unless you hit something like the spinal cord, brain, or hip (the odds of which are extremely low), the assailant is still going to be coming after you. It isn't like the movies where someone gets shot and instantly falls to the ground. Hell, with a .22, unless you even hit an artery or major vein, they aren't even going to bleed out anytime soon. They probably won't even register they got hit.
3. Drawing your gun from concealment, aiming, and firing is going to take longer than half a second. If you take a look at a few concealed carry forums, the goal is to train to the point where you can draw, aim, and shoot from concealment in less than 2 seconds. This also excludes the time it takes for you to view and acknowledge the threat. Does the assailant have a melee weapon where they have to come up to you to hurt you? If they already have a gun out and aimed at you, there is no way you can draw, aim, and shoot faster than they can pull the trigger. Odds are you won't get hit, and if you do get hit, it won't be immediately life threatening (as getting shot goes anyway). Do you think you can shoot well under that kind of pressure?
So to answer your questions, the odds of you hitting your target are slim, and the odds of the shot being fatal are even slimmer.
Most often in the real world, when you make a move such as reaching for your weapon, the average mugger will find somewhere else he has to be in a hurry. Your body posture will show that you aren't an easy target and that they have the threat of death if they pursue you. You are no longer "easy pickings," and it isn't worth it to continue to come after you.