A profound analysis of shyness and over-confidence :
"A shy person who is afraid of the attention of others is not free of ego, but has an ambivalent ego that both wants and fears attention from others. The fear is that the attention may take the form of disapproval or criticism, that is to say, something that diminishes the sense of self rather than enhances it. So the shy person's fear of attention is greater than his or her need of attention. Shyness often goes with a self-concept that is predominantly negative, the belief of being inadequate. Any conceptual sense of self - seeing myself as this or that - is ego, whether predominantly positive (I am the greatest) or negative (I am no good). Behind every positive self-concept is the hidden fear of not being good enough. Behind every negative self-concept is the hidden desire of being the greatest or better than others. Behind the confident ego's feeling of and continuing need for superiority is the unconscious fear of inferiority. Conversely, the shy, inadequate ego that feels inferior has a strong hidden desire for superiority. Many people fluctuate between feelings of inferiority and superiority, depending on situations or the people they come into contact with. All you need to know and observe in yourself is this : whenever you feel superior or inferior to anyone, that's the ego in you."
Eckhart Tolle, A New Earth - Awakening to your life's purpose, chapter "Role-playing: the many faces of the ego".