There are many good reasons to get trained by and carry a firearm, but, fear of these situations isn't really one. These shootings occur and are carried out within a very small segment of the population involved in shady activity who are killing each other. 

Don't be a dirtbag, don't hang around dirtbags, and don't go where dirtbags go. Be home in bed in the middle of the night and you don't have a lot to worry about.