Every day, millions of people click on Facebook “Like” buttons, boldly declaring their preferences for a variety of things, such as books, movies and cat videos. But those “likes” may reveal more than they intend, such as sexual orientation, drug use and religious affiliation, according to a study that analyzed the online behavior of thousands of volunteers.

Your preferences define you. Researchers have known for decades that people's personal attributes — gender, age, religion, sexual orientation, and personality type — correlate with their choice of products, concepts and activities.

Just consider the different populations at an opera and a NASCAR race. This is why companies are so eager to gather personal information about their consumers: Advertising is far more effective when it is targeted to groups of people who are more likely to be interested in a product.

The only aspect that has changed is the increasing proportion of personal information that is available as digital data on the Internet. And Facebook has become a major hub for such data through its Like button. A team led by Michal Kosinski, a psychologist at the University of Cambridge in the United Kingdom as well as at Microsoft Research, wondered just how much people's likes reveal about them.

The likes data are public information. The hard part was getting the data on intelligence and other such attributes to compare with the likes. For that, Kosinski and his Cambridge colleague David Stillwell created a Facebook app called myPersonality. After agreeing to volunteer as a research subject, users of the myPersonality app answer survey questions and take a series of psychological tests that measure things such as intelligence, competitiveness, extraversion versus introversion and general satisfaction with life.

Kosinski and Stillwell not only get those data but also data from the user's Facebook profile and friends network. In return, users get a peek at their own information. More than 4 million people have volunteered already.

The researchers used data from 58,000 U.S.-based myPersonality volunteers to build a statistical model. Then they used a sample of myPersonality volunteers to test how well the model could predict personal attributes from likes.

Facebook likes are an amazingly good predictor of personal attributes, the team reported online Monday in the Proceedings of the National Academy of Sciences. The most accurate predictions were for gender (93 percent) and race (95 percent), as limited to Caucasian versus African American. But people's likes also predicted far more sensitive personal attributes such as homosexuality (88 percent for men, 75 percent for women), religion (82 percent), political party membership (85 percent), and even use of cigarettes, alcohol, and drugs (73 percent, 70 percent and 65 percent, respectively). Many of the likes that had the strongest prediction power make intuitive sense, such as “Jesus” for Christians and “Glee” for gay men.

“What was traditionally laboriously assessed on an individual basis can be automatically inferred for millions of people without them even noticing,” Kosinski says, “which is both amazing and a bit scary.”

The study's results are “hardly surprising,” the company contends in their official response. “On Facebook, people can share the things they like — like bands, brands, sports teams, public figures, etc. By using Login with Facebook on third party sites, people can take their likes and interests with them around the web-to have more personalized experiences.”

“I am afraid that users (of Facebook and other online environments) do not realize that by 'carrying around' their likes, songs they listen to, websites they visit, and other kinds of online behavior, they are exposed to a degree potentially well beyond what they expect or would find comfortable,” Kosinski says.