I've been Mountain Biking in the Canadian Rockies for almost 20 years now,
...and rarely see a bear on the trails. Banff
National Parks are the most popular Hiking/Biking destinations.
The only bear precautions you need are some basic information from the parks service and a bear bell on your bike/walking stick.
Typically a bear attack is a result of someone startling a bear because it didn't hear them coming around the corner.
Usually they hear you first and turn tail for the opposite direction.
The odd case of an attack on humans is usually when you get between a mother and her cubs,
or an overly aggressive male during certain times of the year.
Grizzlies are not very common unless you go further north, but
The Parks Service provides more information on Bear activiy right at the Park gates, or you can do what I do...
Visit the local Bike shop to find out which trails and areas Bikers have reported bear sightings and you'll get a very good idea of which areas to avoid during certain times of the year.
Way more people die in highway auto collisions with other drivers on the way to the parks than from wild animal attacks.