A lack of self-confidence seems to be typical of women in their high school and college years.
``Self-confidence regarding mathematics appears to be the most distinguishing characteristic separating collegiate men and women. There are clear indications that at every level, from middle school to the doctorate, women generally are less confident in their mathematical abilities than men. Successful women report receiving encouragement and assurance of their abilities at several critical junctions from parents and instructor." D. J. Lewis 
The situation is similar in Computer Science . Since many women lack confidence in their decision to enter the program, it is easy to change their minds, especially if they encounter bias in their teachers and colleagues and see a less ``chilly environment" in another subject area.
If a Computer Science department wants to retain its women students, then this lack of confidence is a fact to be recognized, and the faculty would need to follow the guidance of the Hippocratic oath: ``First, do no harm."
``[T]he actions often are not intended to be discriminatory; the people who convey biased attitudes toward women may be well-intentioned. Nevertheless, the effect of their behavior is to undermine the professional image of women held by their colleagues and the women themselves."
A. Pearl, M. E. Pollack, E. Riskin, B. Thomas, E. Wolf, and A. Wu
``Singly, these behaviors probably have little effect. But when they occur again and again, they give a powerful message to women: they are not as worthwhile as men nor are they expected to participate fully in class, in college, or in life at large.''
B. R. Sandler
``The unequal treatment of women who come to MIT makes it more difficult for them to succeed, causes them to be accorded less recognition when they do, and contributes so substantially to a poor quality of life that these women can actually become negative role models for younger women, [wrote the tenured women of the Faculty of Science in a report to the Dean of Science]. In short, they said, they were so miserable that any young woman looking up at them would think, `Why would I want that?'"
Boston Globe, 21 March 1999, p. A01