Ultimately, the most relevant stat to consider if probably fatal bear attacks within a Canadian National/Provincial Parks (it sounds like guns aren't necessarily prohibited in the US parks), and how many of these might have been mitigated with a firearm? I'll actually put in a bit of work here, but
this list may not be comprehensive:
1. Doug Inglis, 62, male
2. Jenny Gusse, 62, Female [15] September 29, 2023 Wild Red Deer River Valley, Banff National Park, Alberta A response team trained in wildlife attacks were mobilized, after receiving an alert from an inReach GPS device at about 8 p.m. on Friday Sept 29, 2023, but weather conditions at the time did not allow for helicopter use, leading the team to travel to the location by ground through the night. The response team arrived at 1 a.m. and found two deceased individuals and their dog (Tress), also killed. A grizzly bear displaying aggressive behavior was encountered and euthanized at the site.[16][17]
Seems unlikely a gun would have helped; perhaps could have saved one of them
3. (Black Bear) Jacqueline Perry, 30, female September 6, 2005 Wild Missinaibi Lake Provincial Park, Ontario Perry was killed in an attack at a remote campsite.[108] Her husband was seriously injured trying to protect her with a Swiss Army knife, and later was given a Star of Courage award from Governor General Michaëlle Jean.[109] Ministry of Natural Resources staff shot and killed the bear near the area where the fatal attack occurred.[110]
Gun may have helped; hard to say if it would have been soon enough to save her life
4. Isabelle Dubé, 35, female June 5, 2005 Wild Canmore, Alberta Dubé was killed while jogging with two friends on the Bench Trail. After an initial attack, Dubé climbed a tree while her friends sought help. The bear brought Dubé down from the tree and mauled her.[133][134] Fish and wildlife officers shot and killed the bear.[134] At the time of the attack, the trail was closed, and the public had been told to avoid it.[135] A few days earlier, the bear had been relocated from Canmore to Banff National Park.[133]
Gun may have helped, though hard to say how likely 3 women would be to carry a gun(s) while jogging.
5. (Black Bear) Raymond Kitchen, 56, male
6. Patti McConnell, 37, female August 14, 1997 Wild Liard River Hot Springs Provincial Park, British Columbia McConnell died from injuries while defending herself and her 13-year-old son Kelly from a black bear attack on a boardwalk to the hot springs. Kitchen heard the attack in progress, and was killed while attempting to rescue. Kelly and a 20-year-old man were also injured. The bear was shot while standing over the victims.[141][142] McConnell's son received a Star of Courage for his attempt to save his mother. Kitchen also received the honor, posthumously.[143]
gun may have helped, but it's worth noting the number of humans that may have been caught in crossfire
7. (Black bear) Raymond Jakubauskas, 32, male
8. Carola Frehe, 48, female October 11, 1991 Wild Algonquin Provincial Park, Ontario While they were setting up camp on Bates Island, a black bear broke both of their necks. The bear then dragged their bodies into the woods and consumed the remains. When police arrived five days later, the bear was guarding the bodies. A park naturalist called the attack "right off the scale of normal bear behavior".[149][150]
a gun may have helped; seems more likely to save one of them than both
9. Christine Courtney, 32, female July 5, 1996 Wild Kluane National Park, Yukon Courtney was killed while hiking on the Slim's Valley trail in Kluane National Park. Her husband was also attacked but survived. Park wardens killed the bear.[163]
gun may have helped
10. Trevor Percy-Lancaster, 40, male September 15, 1992 Wild Jasper National Park, Alberta Percy-Lancaster and his wife were setting up camp in an isolated area of the Tonquin Valley. They surprised a bear,
and began running away. The bear initially caught Percy-Lancaster's wife, and then he distracted the bear, which turned on him.[168][169]
don't want to victim blame, especially considering it was 31 years ago and I don't know what conventional wisdom was at the time, but I find it hard to imagine proficient deployment of a gun instead of fleeing
11. Ernest Cohoe, 38, male August 24, 1980 Wild near Banff, Alberta While fishing with a friend just north of Banff, Alberta, a bear charged and bit off part of Cohoe's face. He died a week later as a result of the injuries.[193][194]
gun may have helped...though hard to say if it would have precluded the charge
In every case where a gun may have helped,
bear spray may also have been just as effective (not listed in these summaries, would have to dive deeper to see if it was deployed). If bear spray was present but not deployed for whatever reason, it seems likely that a firearm would also not have been deployed for those same reasons.
So it's really a question of how many times has bear spray been insufficient, and for what reason? If the reason was inaccuracy, then a firearm is unlikely to have fared better. Properly deployed, you can fire ~4 good bursts from a can. So maybe bullets #5 and beyond would be the difference maker.
Without reading deeply into each of these incidents, we only know of 1 can of emptied bear spray
43 years, 11 fatalities where guns were prohibited as an option. You'd have to dive more deeply to consider relative gun use vs. national park backcountry use (though many of these were not far off the beaten track), but I can't fathom any way to twist the numbers to conclude it is safer to be in the presence of a firearm than it is to be in bear-country without one.
A few incidents where guns were present and failed to save (there are many more, I wasn't really looking for them):
12. Claudia Huber, 42, female October 14, 2014 Wild near Teslin, Yukon A 25-year-old healthy male grizzly bear broke into a home and chased the victim and her husband outside. The bear pursued and fatally attacked Ms. Huber. Her husband, Matthias Liniger, shot at the bear and killed it.[69]
13. Rick Cross, 54, male September 7, 2014 Wild Kananaskis Country, Alberta Cross, a hunter, was killed by a mother bear when he accidentally got between her and her cubs. Park rangers stated that it appeared that Cross managed to fire his rifle before being overwhelmed. RCMP said it appeared he wandered into the area where the mother and cub were feeding on a dead deer.[71]
14. Ken Novotny, 53, male September 17, 2014 Wild near Norman Wells, Northwest Territories While on a hunting trip near Norman Wells, Novotny was charged and struck by a bear. Friends reported Novotny had just killed a moose and was processing the carcass when the bear "came out of nowhere." He died on the scene. Authorities later found and killed the bear responsible for his death.[70]
15. Don Peters, 51, male November 25, 2007 Wild near Sundre, Alberta Peters' body was found 200 metres (660 ft) from his parked truck. He was on a hunting trip. An autopsy confirmed that he died due to a grizzly bear attack. The bear that attacked Peters was captured and killed the following April.[126][127]