Intellect has nothing to do with gender. People are just idiots.
Stereotypes have a basis in reality in that they are overgeneraliztions of perceived patterns. An older comment from another person who thought I was male suggested it might be due to the nature of my discourse and content on science research. While women can perform just as well as men in these realms there are disproportional numbers of men dominating science and engineering related fields. This in part is the result of prejudicial behavior and belief. It helps to keep a healthy sense of humor about this, but to also stop and reflect when an incident occurs. We need to illuminate why these perceptions influence society if we wish to change them.