A little background on me:
Durring the summer of 2004 I spent 2.5 months doing grizzly research in the Bob Marshal Wilderness in northwestern Montana.
Before starting I spent a solid week being trained by some of the leading bear experts in the country. Training focussed on how to avoid bears, how to read them in an encounter, how to avoid an attack based on that reading, and if an an attack occurred how to respond based on your reading of the bears body langauge, movement, ect.
The nature of the work was living in the wilderness (30-50 miles from the nearest road at all times) carrying large qualities of bear bait on my back day in and day out. The bait consisted of 2 parts cowblood and one part fish juice, both of which had "ripened" for a year. This shit stank and the 3 liter nagene bottles couldn't contain the smell. Our packs, clothing, and everything else smelled like bear bait. Over the summer I saw alot of bears and I can promise you jumping a bear at close range is nothing to take lightly.
So if you are serious about staying alive in bear country pay attention.
The best defense is avoidance, only a fool wants a close encounter with a griz. Hang your food, keep a clean camp, etc. Learn everything you can about bears before going into bear country.
Forget the idea of 50 yard shots. Most encounters happen at close range in very thick cover. To give you an idea of how thick it can be. I jumped a bear that ran from my 10 oclock to my 2 oclock at less than 10 yards and I couldn't see it well enough to identifiy it as black or grizzly. Not to mention, if you start shooting at a bear at 50 yards the Game Warden isn't going to buy your self the defense story. You can also forget the notion of "but I have 30 shots" If you have never seen a bear move up close you have no idea just how fast they really are. In a bear attack if you get 2 seconds before it hits you then you are pretty lucky.
From what I have learned from experts and my own personal experiance, the best primary defensive tool other than your brain is good pepper spray in a hip holster that can be fired FROM THE HIP if needed. Obviously if you have time to remove if from your holster then do so but you may not have time so be sure it can be discharged directly from the holster. Buy counter assualt brand pepper spray, its pretty much as good as it gets. DO NOT buy the cheap stuff.
If you are able to carry it I would also suggest a 12 gauge shotgun with FULL STOCK loaded with brennekke style slugs (not fosters) or a rifle that you can handle fastly and accurately in a caliber such as .338 Mag or .375 HH. Do not take a 7.62x39 or .308 Win, remember you aren't trying to kill the bear, you are trying to stop it RIGHT THE FUCK NOW. In an close attack, unless the rifle is already IN YOUR HANDS it will probably do you no good. Thats why pepper spray in the best first choice. Its fast, always ready at hand, your don't really have to aim it, and 90+ percent effective.
Now if you want to carry a handgun for when all else fails and the bear in chewing on your leg, then by all means to do but don't carry it as your primary defense.
I'm sure there is some internet comando out there reading this thinking "bull shit, I'll just take my .44 Mag (or other wonder gun) and pity the bear that wants to mess with me." For anybody who wants to argue for a handgun as a primary beer defense weapon, I'll offer you this challenge.
Find the thickest brush you can find in an area you can shoot safely in. Set up a clay pigeon thrower so it throws pigeons waist high along the very edge of the brush. If the thrower is manually operated, set up a string so the pigeon can be thrown safely from the showing position. 20 yards infront of the thrower, walk 3 yards into the brush. With your pistol holstered, release the bird, draw and fire before the pigeon passes your position. Thats pretty much what you will have to do in a bear attack, as the target area you have that will DROP a bear with a pistol is pretty dang small. If you can do this and break the pigeon 90 percent of the time I will agree that for you a pistol is better than pepper spray.