Stupidity is contagious, a study finds.