As others have pointed out, some states like California have laws and enforcement policies that at times appear to favor criminals over self defense. Other states, like Florida or Texas, tend to better enable self defense with lethal force.
The whole thing is an equation you really do not want to find yourself in. Even with justifiable/legal use of deadly force in a defensive situation you are likely to wind up embroiled in a lot of hassles, law suits, and associated costs.