Here is a very interesting study on firearms use during Alaskan bear attacks:
https://www.researchgate.net/publication/261982557_Efficacy_of_Firearms_for_Bear_Deterrence_in_Alaska
I was initially surprised at the higher success rate for handguns, but after thinking about it, this is likely due to handguns being near to hand more often than long guns.
The factors for firearms failure?:
As one would expect, this was at the end of the study:
I contest that final contention. First, all the reasons for firearm failure can equally cause spray failure with the additional factor of wind (the wind will never blow your bullet back into your face). Secondly, spray has only been around for twenty years or so, and any study conducted thus far cannot be accurately compared to a study of firearms use going back over a century. Thirdly, a 90% success rate isn’t much better than the firearms success ate so far. Finally, the single type of bear encounter in which spray shines is that of a dangerously curious bear, and I content that such a bear might as well be killed before he becomes a real problem. I’ve been “tested” by a potentially predatory bear. I had a rifle, and I should have killed him, but I didn’t because I was following the rules. Frankly, I should have just wasted him. I’m fairly confident that he was a subsequent problem bear. Granted, spraying him down might have taught him a lesson, but he gave me little opportunity to blast him with the 338 WinMag. I had zero opportunity to spray him down.
Spray with rifle and sidearm? Sure.......in base camp or in the vehicle. Am I going to carry that shit around on my body? No way. The Glock is heavy and bulky enough. I’ll stick with the firearms, hunting license, and bear tags in my pocket........and, most importantly, bear awareness and caution..........