We have a large bear population in SW PA. I spend a lot of time in the woods and have seen many bear without incident. A male will usually ignore you or move away. The female will usually give you a warning growl which means you are getting close to her young. Best thing to do is clear the area the way you came in. Getting in between a sow and her cubs is a dangerous thing. If cubs are seen mom is somewhere close. Go back the way you came or in the opposite direction of the cubs. I also carry a .44 revolver on my side.
They don’t want any more parts of you than you want of them. The hardest thing is determining which direction to go to clear the area. Remain calm, don’t run, walk briskly though.
Lone bears hunting people as a source of food are a greater cause of deadly maulings and related predatory attempts ... than surprising a mother bear with cubs
http://www.eurekalert.org/pub_releases/2011-05/uoc-bop050911.php