Just yesterday I watched a video on YouTube of a guy who survived a Kodiak attack back in early 2000. He said your best chance is to lay flat on your stomach, play dead, spread your legs so you can't be easily flipped and use your hands to protect your neck because, if you face them, they'll definitely go for your face. If the bear attacks you because it sees you as a threat instead of food, you'll have a good chance that it will leave you be after it thinks it eliminated the thread. Luckily for the guy it bit him on the neck instead of his skull and that caused his thumb to snap and he thinks that the bear probably thought it snapped his neck and then stopped attacking him and walked off. He also said it's very important, if the bear flips you to use the momentum to flip back on your belly. All of the above only applies to brown bears. If it's a black bear you need to resist as much as possible, make yourself big and be loud and aggressive because that might make them go away. If it's a polar bear you're screwed because it's the only type of bear that is exclusively carnivorous and it will DEFINITELY see you as food.