Are you a shy person with a snarky sense of humor who secretly craves hugs? You might be able to conceal that from your friends, but not from your computer. A new study of Facebook data shows that machines are now better at sussing out our true personalities than even our closest acquaintances.

The idea for the study came together last year when psychologist Youyou Wu and computer scientist Michal Kosinski, then both at the University of Cambridge in the United Kingdom, watched Her, a 2013 science fiction film in which a man falls in love with his computer operating system. "By analyzing his digital records, his computer can understand and respond to his thoughts and needs much better than other humans," Wu says, "including his long-term girlfriend and closest friends." Wu and Kosinski wondered: Is that possible in real life?

They had access to a perfect data set to put the idea to the test. In 2007, their colleague David Stillwell, another Cambridge psychologist, created a Facebook app called myPersonality. With consent, users give the app abundant personal data. Not only do they grant access to Facebook info such as their likes and list of friends, but they also take standard psychological tests and answer survey questions. Their only rewards are the results of those psychological tests and a synopsis of how they compare with the rest of the myPersonality user population.

With Kosinski's help, the app became a viral hit, with more than 4 million people signing up and using it so far. It also became a scientific gold mine. In a 2013 analysis of the myPersonality data published in the Proceedings of the National Academy of Sciences (PNAS), a team led by Kosinski showed that the pattern of people's likes on Facebook is enough to predict their personal traits such as gender, race, political persuasion, and even sexuality. The paper was one of the year's most blogged about and cited.

Computationally judging whether people on the Internet are gay or straight based on their Facebook likes is one thing, but determining those people's personalities more accurately than a human seemed far-fetched, Wu admits. Experiments have shown that "people are very good at judging each other," she says.

One of the standard methods for assessing personality is to analyze people's answers to a 100-item questionnaire with a statistical technique called factor analysis. There are five main factors that divide people by personality—openness, conscientiousness, extraversion, agreeableness, and neuroticism—which is why personality researchers call this test the Big Five. People can accurately predict how their friends will answer the Big Five questions. "For example, I got a 4.5 out of 5 on extraversion based on my answers about myself," Wu says, "and my friend got a 4.4 out of 5 based on his answers about me."

Wu, Kosinski, and Stillwell focused on 86,220 people who took the Big Five personality test through the myPersonality Facebook app during the past 2 years. The researchers used those results and the people's Facebook data to create a statistical model that predicts personality based on Facebook likes. To compare the computer's accuracy with human judgment, they analyzed results from 17,622 friends of those participants who filled out the 100-item questionnaire based on how they thought their friends would answer. Those people "liked" thousands of things on the Internet—everything from David Bowie and atheism to Rush Limbaugh and smiling. If you really can predict personality from Facebook likes, these items should combine into fingerprints for different personality types.

Computers aren't yet as smart and sultry as the one in Her, but armed with your Facebook data, they can accurately judge your personality in a fraction of a second. Compared with humans predicting their friends' personalities by filling out the Big Five questionnaire, the computer's prediction based on Facebook likes was almost 15% more accurate on average, the team reports online today in PNAS. Only people's spouses were better than the computer at judging personality.

So what do our Facebook personality fingerprints look like? Some of the patterns make intuitive sense. For example, the "openness" factor ranges from liberal to conservative, loosely mapping onto political tendencies, and indeed liberal people tended to like Bowie and atheism, whereas conservative people like Fox News and Limbaugh. Other personality predictors seem bizarre. People on the cooperative side of the "agreeableness" spectrum tend to like The Bourne Identity, a film about a lone government assassin, but competitive people like the Oatmeal, an Internet cartoon that celebrates science, geek culture, and long-distance running, among many other topics.

"It is a clever use of like data," says Dana Carney, a psychologist at the University of California, Berkeley, who wasn’t involved in the study. Besides contributing to our understanding of how personality affects life choices, she notes that online marketing is the obvious application of the research, because the better you understand the "personality characteristics of an online user base," the better your chances are of influencing them. A next step will be to increase the accuracy of the predictions by harvesting "other Internet behaviors and combine them with likes," she says, such as individuals’ Web browsing behavior, which companies are already harvesting.