To answer the last first, it appears to be checking ONLY the player. Everyone seems to go kamikaze against dragons, and vampires, otherwise there wouldn't be mods for that.
I'd expect a simple Player.GetLevel() call does it all.
I think Ghastly is partly right, but I also think there might be a bit more going on.
Looking on the Wiki, there are a number of Game Settings associated with Confidence and Intimidation. For example, someone who is 'cowardly' gets a multiplier of zero, someone who is 'foolhardy' gets a multiplier of 100, and an 'average' person gets a multiplier of 1. This makes me think there is some kind of calculation based upon a 'threshold', which is probably tied to the Player's Level/Intimidation. I assume 'cowardly' is to make it never trigger, and 'foolhardy' is to guarantee it triggers.
Something like : AttackChance = ( Target Level + NPC's Random Confidence) * Intimidation Confidence Multiplier. And if AttackChance is high enough, they attack.
The wiki says that each Actor chooses a confidence between -0.5 and +0.5, and then there are these multipliers. It'd maybe be worth setting up an NPC, tweaking those game settings, and seeing how he reacts to being attacked by the Player. It's also possible to modify the Player's Intimidation via Perks Entry Points, which makes me think there's probably a 'base intimidation' based on the Player's Level or something.
Yes that would seem to be the case.
I have seen NPCs run from other NPCs though.
The reason I am asking is this:
The confidence decision won;t be just made once, but at each point that the actor is preparing an attack. They're already deciding whether to use a ranged or melee attack, and the "do I attack or flee" choice must also be rolled in there. A wounded opponent will sometimes break off and run off to heal. So the algorithm is also considering current health. However, at the start, they're at 100% of their health, so I'd assume that has no effect until it starts to drop.
Ya, It would have to be based on player level or would seem to have to be because it would change during the game as the player leveled up.