"Grizzly bears rarely attack people," Kerry Gunther, a bear biologist with Yellowstone National Park, told The Dodo. "However, most attacks that do occur involve surprise encounters between hikers and grizzly bears in backcountry areas."
That's why you really have to take precautions when going into bear country.
Make your presence known.
If you're out walking in the woods and you spot a bear, act like you would with a stranger. You wouldn't run up to a person on the street and hug them, nor would you sprint away screaming. Be calm, stand your ground and talk calmly so the bear knows you're there.