I understand that bear spray is statistically more effective than firearms at halting attacks.
Ah yes, the eternal and very contentious debate about guns vs bear spray. These arguments always become very heated, with lots of strong opinions, often by people who have never actually shot a bear. In
my opinion, a good sources is Rick Sinnott's article
Are guns more effective than pepper spray in an Alaska bear attack? Sinnott recently retired as an Alaska Dept of Fish and Game wildlife biologist. For many years he was the biologist for the Anchorage area, and investigated numerous human/bear encounters, and disposed of many problem bears. He knows what he is talking about.
For a scientific article on the effectiveness of spray, see Smith et al:
Efficacy of Bear Deterrent Spray in Alaska I would check out a biologist named Stephen Herrero and his latest information.
See Herrero's book
Bear Attacks: Their Causes and Avoidance. Herrero is a Canadian wildlife biologist, and one of the worlds experts on bears. His book is well worth a read. However the "revised edition" doesn't have a lot of new material, so it is well worth buying a used copy of the first addition, if you find one.
For the record, I own both long guns and handguns, and am profficient with them. I have killed two bears (one black & one brown) on hunting trips. However
my own personal choice for most of my frequent activities in bear country is to carry bear spray rather than a gun. Your choices may differ.