Bears don't like to be surprised. If you are hiking in a place where you can't see, make your presence known by talking or clapping your hands. If you are hunting you will probably be walking very quietly. Move slowly and be especially alert. While this isn't always practical, the larger the group the smaller the risk of attack.
Groups of people seem to intimidate bears.
Bears are more likely to approach one or two people than larger groups. Keep close together. Being strung out along a trail creates many groups of one. Moving towards a bear is aggressive behavior-it forces the bear to react. If you inadvertently approach a bear and feel the bear is not aware of your presence, take advantage of the situation and slowly move away.