A Special Forces Weapons Sergeant would say, "A bear has ~5x more sense of smell than a bloodhound. Bear spray is a more effective deterrent than a weapon. If one encounters a bear rustling around in the woods with their nose up, laying down a wall of industrial strength pepper spray is going to make them want to protect that mechanism they use for survival and 99.9% of the time, they will hastily leave. Once they charge, it's best to be armed with ,44 or 454 Casull and unload it center of mass."
Disclaimer: WolfRiverJoe has indicated that it might be beneficial for me to search the Internet for some "basic firearms" information, so you may want to accept the above citation with a grain of salt.