In a finding that is sure to be scrupulously ignored by the National Rifle Association, researchers have apparently found that guns are pretty much useless as self-defense against bears. The original paper is unfortunately difficult to access online, but an accompanying press release summarizes the results:
[BYU biologist Tom] Smith and his colleagues analyzed 269 incidents of bear-human conflicts in Alaska for the study, appearing in the forthcoming issue of the Journal of Wildlife Management. Those incidents involved 444 people and 357 bears, 300 of which were brown bears. The researchers found no statistical difference in the outcome (no injury, injury or fatality) when they compared those who used their gun in an aggressive encounter (229 instances) to those who had firearms but did not use them (40 instances).
In contrast, an earlier study by the same group found that pepper spray is 92% effective in stopping aggressive bear attacks. So while hikers can certainly exercise their right to bear arms, using those arms against bears is probably futile.