This is already known to some extent. For example, PUAs deliberately wear uncool clothing as a kind of peacock's tail. ("I'm so popular I can dress weird and still be loved by everyone.")
However, it's not quite all the way there. It's who you are that determines how popular you are. Your character. Note that this will also affect your appearance -- not just your choice of clothes, but your physical appearance. People who are angry or upset all the time will show that on their faces. It is a drain on their health. Over time this has an uglifying effect, especially over the growth years.
Appearance, intellect, riches, gifts, favours you perform, even glamour -- who you are trumps all these when it comes to how likeable you are.
People bully other people by trying to get a 'rise' out of them. They try to provoke a negative emotional response. This is only possible if the target feels ashamed of himself in some way. Nerds do feel ashamed of themselves.
This is why Sheldon Cooper might just be a role model for nerds. He is not ashamed of himself. He values intellectual accomplishment over popularity and sex.
Sheldon aside, however: character is not fixed, so popularity can never be fixed.