Instead of an attacking bear how about defending yourself against a robbery or a rapist with a handgun? At least there’s a chance once the perp sees the weapon would think twice.
The statistics are very difficult to know. Successful defenses, where the perp runs off without physical harm to anyone, are seldom reported.
It appears success is in the 95%+ range.