Last summer racoons kept visiting my second story deck. One night I was in bed and heard a noise out there. I got up and went out to the deck in my underwear to scare the intruder off. Got out there and turned to my right, and just sitting there, about 5 feet from me, was a bear facing me. I froze, the bear looked me over, got up, turned around, and casually went back down to ground level and waddled away.
So, while I have not tested this theory since, seeing a human in their underwear might be enough to scare a bear off.