It is all done by market research. I had one of these classes in my MBA studies, in fact, many at GB helped me out by taking a survey that I wrote for that class.
It is amazing how much you can tell from statistics (and how much you can't). Mine was a short survey, but even with that, you could see certain trends. Longer stuff such as this would involve more in-depth questions.