You are not an officer of the law. You do not have the right to draw your weapon in this case. If the BG shoots the clerk or points his gun at you, then draw and fire. Otherwise hold up and wait for the PD.
Maybe it depends upon the jurisdiction you are in, but in New Mexico I absolutely would have "the right" to shoot the BG. In NM and many other places you may use deadly force to defend the life of another human being, even one you don't know. In many places you can use deadly force to stop a violent felony as well.
That said, I chose to retreat and call police. Why?
First, who is this clerk to me? I don't know him, its one person being robbed. Hope he gets out of this ok. Why risk making my poor wife a widow for him? If he was a friend, or it was several strangers in danger even, I might change my mind. But I am a happily married man, and so staying alive comes before being a hero.
Second, a CNS shot... Even with a 9mm +p, I am not sure the BG would
instantly have his lights turned out. If the gun is to the clerks head and the BG's finger is on the trigger... I am not sure that shooting the BG in the head would be the best thing for the unfortunately clerk. There is an area about the size of a 3x5 card I'd have to hit, without having practiced the exact shot, with enough force and velocity to be sure it would penetrate and smash the brain behind it. Anything else is a bit of a crap shoot. An accurized .223 or .308 would be the normal choices for a police sniper if he was given the order to take this shot. A pocket pistol is not an accurized .308.
Third, I don't KNOW that the BG is going to shoot the clerk. Most robberies don't end with a dead body. They might, but why risk myself and perhaps the clerk too, if its not pretty certain the clerk is about to die? He is certainly in danger of dieing, but there is a very good chance if I leave the BG takes the money and leaves the clerk alive. This might be different if the BG already shot two other people and the clerk was next on the menu, there is no indication that is the case.