I think it depends a lot on where you hike and what level of difficulty. I feel hiking on trails solo is quite safe. It gets a bit more difficult to evaluate once you are off trail or truely solo (not seeing anyone for weeks at a time) in a very remote area. A friend of mine that I hiked with in the Wind River Mountains this summer is on the Fremont County SAR. In the last 5 years they have brought out bodies of two solo hikers. We went over a pass this summer only feet away from a fellow who died up there. It is a loose boulder field and he dislodged a rock that pinned him down. He was 50 feet from a lake and but could not get to water. His dog stayed by his side but could not get water and did not go for help. This is a really remote area and only a handfull of people even get in the general area each year. He wrote a journal as he died of dehydration. It was 7 days before anyone knew he was in trouble.

If you go out with competent people they are an advantage, particularly in bad weather. If your partner also has wilderness first aid experience, they truely can save your life.

In my opinion:

group of 4 competent hikers = safest
go with one other person = safer
go solo = safe in some conditions
go with incompetent people, regardless of number = not safe