1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Data Science of the Facebook World

Discussion in 'Social Networking Sites' started by danailo, Apr 27, 2013.

  1. danailo

    danailo Senior Member

    Joined:
    Apr 1, 2011
    Messages:
    1,191
    Likes Received:
    766
    Location:
    http://fortunelords.com
    Home Page:
    Article source


    More than a million people have now used our
    Wolfram|Alpha Personal Analytics for Facebook. And as part of our latest update, in addition to collecting some anonymized statistics, we launched a Data Donor program that allows people to contribute detailed data to us for research purposes.

    A few weeks ago we decided to start analyzing all this data. And I have to say that if nothing else it?s been a terrific example of the power of Mathematica and the Wolfram Language for doing data science. (It?ll also be good fodder for the Data Science course I?m starting to create.)
    We?d always planned to use the data we collect to enhance our Personal Analyticssystem. But I couldn?t resist also trying to do some basic science with it.
    I?ve always been interested in people and the trajectories of their lives. But I?ve never been able to combine that with my interest in science. Until now. And it?s been quite a thrill over the past few weeks to see the results we?ve been able to get. Sometimes confirming impressions I?ve had; sometimes showing things I never would have guessed. And all along reminding me of phenomena I?ve studied scientifically in A New Kind of Science.
    So what does the data look like? Here are the social networks of a few Data Donors?with clusters of friends given different colors. (Anyone can find their own network using Wolfram|Alpha?or the SocialMediaData function inMathematica.)
    [​IMG]


    So a first quantitative question to ask is: How big are these networks usually? In other words, how many friends do people typically have on Facebook? Well, at least for our users, that?s easy to answer. The median is 342?and here?s a histogram showing the distribution (there?s a cutoff at 5000 because that?s the maximum number of friends for a personal Facebook page):
    [​IMG]
    But how typical are our users? In most respects?so far as we can tell?they seem pretty typical. But there are definitely some differences. Like here?s the distribution of the number of friends not just for our users, but also for their friends (there?s a mathematical subtlety in deriving this that I?ll discuss later):
    [​IMG]
    And what we see is that in this broader Facebook population, there are significantly more people who have almost no Facebook friends. Whether such people should be included in samples one takes is a matter of debate. But so long as one looks at appropriate comparisons, aggregates, and so on, they don?t seem to have a huge effect. (The spike at 200 friends probably has to do with Facebook?s friend recommendation system.)
    So, OK. Let?s ask for example how the typical number of Facebook friends varies with a person?s age. Of course all we know are self-reported ?Facebook ages?. But let?s plot how the number of friends varies with that age. The solid line is the median number of friends; successive bands show successive octiles of the distribution.
    [​IMG]
    After a rapid rise, the number of friends peaks for people in their late teenage years, and then declines thereafter. Why is this? I suspect it?s partly a reflection of people?s intrinsic behavior, and partly a reflection of the fact that Facebook hasn?t yet been around very long. Assuming people don?t drop friends much once they?ve added them one might expect that the number of friends would simply grow with age. And for sufficiently young people that?s basically what we see. But there?s a limit to the growth, because there?s a limit to the number of years people have been on Facebook. And assuming that?s roughly constant across ages, what the plot suggests is that people add friends progressively more slowly with age.
    But what friends do they add? Given a person of a particular age, we can for example ask what the distribution of ages of the person?s friends is. Here are some results (the jaggedness, particularly at age 70, comes from the limited data we have):
    [​IMG]
    And here?s an interactive version, generated from CDF:



    The first thing we see is that the ages of friends always peak at or near the age of the person themselves?which is presumably a reflection of the fact that in today?s society many friends are made in age-based classes in school or college. For younger people, the peak around the person?s age tends to be pretty sharp. For older people, the distribution gets progressively broader.
    We can summarize what happens by plotting the distribution of friend ages against the age of a person (the solid line is the median age of friends):
    [​IMG]
    There?s an anomaly for the youngest ages, presumably because of kids under 13 misreporting their ages. But apart from that, we see that young people tend to have friends who are remarkably close in age to themselves. The broadening as people get older is probably associated with people making non-age-related friends in their workplaces and communities. And as the array of plots above suggests, by people?s mid-40s, there start to be secondary peaks at younger ages, presumably as people?s children become teenagers, and start using Facebook.
    So what else can one see about the trajectory of people?s lives? Here?s the breakdown according to reported relationship status as a function of age:
    [​IMG]
    And here?s more detail, separating out fractions for males and females (?married+? means ?civil union?, ?separated?, ?widowed?, etc. as well as ?married?):
    [​IMG]
    There?s some obvious goofiness at low ages with kids (slightly more often girls than boys) misreporting themselves as married. But in general the trend is clear. The rate of getting married starts going up in the early 20s?a couple of years earlier for women than for men?and decreases again in the late 30s, with about 70% of people by then being married. The fraction of people ?in a relationship? peaks around age 24, and there?s a small ?engaged? peak around 27. The fraction of people who report themselves as married continues to increase roughly linearly with age, gaining about 5% between age 40 and age 60?while the fraction of people who report themselves as single continues to increase for women, while decreasing for men.
    I have to say that as I look at the plots above, I?m struck by their similarity to plots for physical processes like chemical reactions. It?s as if all those humans, with all the complexities of their lives, still behave in aggregate a bit like molecules?with certain ?reaction rates? to enter into relationships, marry, etc.
    Of course, what we?re seeing here is just for the ?Facebook world?. So how does it compare to the world at large? Well, at least some of what we can measure in the Facebook world is also measured in official censuses. And so for example we can see how our results for the fraction of people married at a given age compare with results from the official US Census:
    [​IMG]
    I?m amazed at how close the correspondence is. Though there are clearly some differences. Like below age 20 kids on Facebook are misreporting themselves as married. And on the older end, widows are still considering themselves married for purposes of Facebook. For people in their 20s, there?s also a small systematic difference?with people on Facebook on average getting married a couple of years later than the Census would suggest. (As one might expect, if one excludes the rural US population, the difference gets significantly smaller.)
    Talking of the Census, we can ask in general how our Facebook population compares to the US population. And for example, we find, not surprisingly, that our Facebook population is heavily weighted toward younger people:
    [​IMG]
    OK. So we saw above how the typical number of friends a person has depends on age. What about gender? Perhaps surprisingly, if we look at all males and all females, there isn?t a perceptible difference in the distributions of number of friends. But if we instead look at males and females as a function of age, there is a definite difference:
    [​IMG]
    Teenage boys tend to have more friends than teenage girls, perhaps because they are less selective in who they accept as friends. But after the early 20s, the difference between genders rapidly dwindles.
    What effect does relationship status have? Here?s the male and female data as a function of age:
    [​IMG]
    In the older set, relationship status doesn?t seem to make much difference. But for young people it does. With teenagers who (mis)report themselves as ?married? on average having more friends than those who don?t. And with early teenage girls who say they?re ?engaged? (perhaps to be able to tag a BFF) typically having more friends than those who say they?re single, or just ?in a relationship?.
    Another thing that?s fairly reliably reported by Facebook users is location. And it?s common to see quite a lot of variation by location. Like here are comparisons of the median number of friends for countries around the world (ones without enough data are left gray), and for states in the US:
    [​IMG]
    There are some curious effects. Countries like Russia and China have low median friend counts because Facebook isn?t widely used for connections between people inside those countries. And perhaps there are lower friend counts in the western US because of lower population densities. But quite why there are higher friend counts for our Facebook population in places like Iceland, Brazil and the Philippines?or Mississippi?I don?t know. (There is of course some ?noise? from people misreporting their locations. But with the size of the sample we have, I don?t think this is a big effect.)
    In Facebook, people can list both a ?hometown? and a ?current city?. Here?s how the probability that these are in the same US state varies with age:
    [​IMG]
    What we see is pretty much what one would expect. For some fraction of the population, there?s a certain rate of random moving, visible here for young ages. Around age 18, there?s a jump as people move away from their ?hometowns? to go to college and so on. Later, some fraction move back, and progressively consider wherever they live to be their ?hometown?.
    One can ask where people move to and from. Here?s a plot showing the number of people in our Facebook population moving between different US states, and different countries:
    [​IMG]
    [​IMG]


    There?s a huge range of demographic questions we could ask. But let?s come back to social networks. It?s a common observation that people tend to be friends with people who are like them. So to test this we might for example ask whether people with more friends tend to have friends who have more friends. Here?s a plot of the median number of friends that our users have, as a function of the number of friends that they themselves have: [​IMG]
    And the result is that, yes, on average people with more friends tend to have friends with more friends. Though we also notice that people with lots of friends tend to have friends with fewer friends than themselves.
    And seeing this gives me an opportunity to discuss a subtlety I alluded to earlier. The very first plot in this post shows the distribution of the number of friends that our users have. But what about the number of friends that their friends have? If we just average over all the friends of all our users, this is how what we get compares to the original distribution for our users themselves:
    [​IMG]
    It seems like our users? friends always tend to have more friends than our users themselves. But actually from the previous plot we know this isn?t true. So what?s going on? It?s a slightly subtle but general social-network phenomenon known as the ?friendship paradox?. The issue is that when we sample the friends of our users, we?re inevitably sampling the space of all Facebook users in a very non-uniform way. In particular, if our users represent a uniform sample, any given friend will be sampled at a rate proportional to how many friends they have?with the result that people with more friends are sampled more often, so the average friend count goes up.
    It?s perfectly possible to correct for this effect by weighting friends in inverse proportion to the number of friends they have?and that?s what we did earlier in this post. And by doing this we determine that in fact the friends of our users do not typically have more friends than our users themselves; instead their median number of friends is actually 229 instead of 342.
    It?s worth mentioning that if we look at the distribution of number of friends that we deduce for the Facebook population, it?s a pretty good fit to a power law, with exponent -2.8. And this is a common form for networks of many kinds?which can be understood as the result of an effect known as ?preferential attachment?, in which as the network grows, nodes that already have many connections preferentially get more connections, leading to a limiting ?scale-free network? with power-law features.
    But, OK. Let?s look in more detail at the social network of an individual user. I?m not sufficiently diligent on Facebook for my own network to be interesting. But my 15-year-old daughter Catherine was kind enough to let me show her network:
    [​IMG]
    There?s a dot for each of Catherine?s Facebook friends, with connections between them showing who?s friends with whom. (There?s no dot for Catherine herself, because she?d just be connected to every other dot.) The network is laid out to show clusters or ?communities? of friends (using the Wolfram Language functionFindGraphCommunities). And it?s amazing the extent to which the network ?tells a story?. With each cluster corresponding to some piece of Catherine?s life or history.
    Here?s a whole collection of networks from our Data Donors:
    [​IMG]


    No doubt each of these networks tells a different story. But we can still generate overall statistics. Like, for example, here is a plot of how the number of clusters of friends varies with age (there?d be less noise if we had more data):
    [​IMG]
    Even at age 13, people typically seem to have about 3 clusters (perhaps school, family and neighborhood). As they get older, go to different schools, take jobs, and so on, they accumulate another cluster or so. Right now the number saturates above about age 30, probably in large part just because of the limited time Facebook has been around.
    How big are typical clusters? The largest one is usually around 100 friends; the plot below shows the variation of this size with age:
    [​IMG]
    And here?s how the size of the largest cluster as a fraction of the whole network varies with age:
    [​IMG]
    What about more detailed properties of networks? Is there a kind of ?periodic table? of network structures? Or a classification scheme like the one I made long ago for cellular automata?
    The first step is to find some kind of iconic summary of each network, which we can do for example by looking at the overall connectivity of clusters, ignoring their substructure. And so, for example, for Catherine (who happened to suggest this idea), this reduces her network to the following ?cluster diagram?:
    [​IMG]
    Doing the same thing for the Data Donor networks shown above, here?s what we get:
    [​IMG]

    In making these diagrams, we?re keeping every cluster with at least 2 friends. But to get a better overall view, we can just drop any cluster with, say, less than 10% of all friends?in which case for example Catherine?s cluster diagram becomes just:
    [​IMG]
    And now for example we can count the relative numbers of different types of structures that appear in all the Data Donor networks:
    [​IMG]
    And we can look at how the fractions of each of these structures vary with age:
    [​IMG]
    What do we learn? The most common structures consist of either two or three major clusters, all of them connected. But there are also structures in which major clusters are completely disconnected?presumably reflecting facets of a person?s life that for reasons of geography or content are also completely disconnected.
    For everyone there?ll be a different detailed story behind the structure of their cluster diagram. And one might think this would mean that there could never be a general theory of such things. At some level it?s a bit like trying to find a general theory of human history, or a general theory of the progression of biological evolution. But what?s interesting now about the Facebook world is that it gives us so much more data from which to form theories.
    And we don?t just have to look at things like cluster diagrams, or even friend networks: we can dig almost arbitrarily deep. For example, we can analyze the aggregated text of posts people make on their Facebook walls, say classifying them by topics they talk about (this uses a natural-language classifier written in the Wolfram Language and trained using some large corpora):
    [​IMG]
    Each of these topics is characterized by certain words that appear with high frequency:
    [​IMG]
    And for each topic we can analyze how its popularity varies with (Facebook) age:
    [​IMG]
    It?s almost shocking how much this tells us about the evolution of people?s typical interests. People talk less about video games as they get older, and more about politics and the weather. Men typically talk more about sports and technology than women?and, somewhat surprisingly to me, they also talk more about movies, television and music. Women talk more about pets+animals, family+friends, relationships?and, at least after they reach child-bearing years, health. The peak time for anyone to talk about school+university is (not surprisingly) around age 20. People get less interested in talking about ?special occasions? (mostly birthdays) through their teens, but gradually gain interest later. And people get progressively more interested in talking about career+money in their 20s. And so on. And so on.
    Some of this is rather depressingly stereotypical. And most of it isn?t terribly surprising to anyone who?s known a reasonable diversity of people of different ages. But what to me is remarkable is how we can see everything laid out in such quantitative detail in the pictures above?kind of a signature of people?s thinking as they go through life.
    Of course, the pictures above are all based on aggregate data, carefully anonymized. But if we start looking at individuals, we?ll see all sorts of other interesting things. And for example personally I?m very curious to analyze my own archive of nearly 25 years of email?and then perhaps predict things about myself by comparing to what happens in the general population.
    Over the decades I?ve been steadily accumulating countless anecdotal ?case studies? about the trajectories of people?s lives?from which I?ve certainly noticed lots of general patterns. But what?s amazed me about what we?ve done over the past few weeks is how much systematic information it?s been possible to get all at once. Quite what it all means, and what kind of general theories we can construct from it, I don?t yet know.
    But it feels like we?re starting to be able to train a serious ?computational telescope? on the ?social universe?. And it?s letting us discover all sorts of phenomena. That have the potential to help us understand much more about society and about ourselves. And that, by the way, provide great examples of what can be achieved with data science, and with the technology I?ve been working on developing for so long.
     
    • Thanks Thanks x 4
  2. BBKane

    BBKane Registered Member

    Joined:
    Oct 29, 2012
    Messages:
    55
    Likes Received:
    18
    Occupation:
    Trench Warrior
    Location:
    Wally World
    Some amazing insight into just the "everyday" of people throughout the aging process. Nice dense read.

    It's interesting when you compare a study like this to the Grant study from Harvard (about happiness and life):

    "The Grant Study is a 68-year longitudinal study of two socially different cohorts: 237 physically and mentally healthy Harvard college sophomores from the classes of 1939-1944, and a second cohort of 332 disadvantaged non-delinquent inner-city youths who grew up in Boston neighborhoods between 1940 and 1945.[SUP][1][/SUP] The subjects were all male, white and of American nationality. The men were followed for 68 years until they reached the ages of 70 years for the inner-city group and 80 years for the Harvard cohort. The study, its methodology and results are described in two books by a principal investigator in the study, George Vaillant. The first book [SUP][2][/SUP] describes the study up to a time when the men were 47 years of age, and the second book [SUP][3][/SUP] to when the inner-city men were 70 years old and the Harvard group were eighty.

    The men were evaluated at least every two years by questionnaires, information from their physicians, and in many cases by personal interviews. Information was gathered about their mental and physical health, career enjoyment, retirement experience and marital quality. The goal of the study was to identify predictors of healthy aging.
    "

    Just how far everything has come and how in depth our knowledge of the human psyche/condition is. And not to mention how damn fascinating all the data is!

    Thanks for sharing this.

    Best

    BB
     
  3. bertbaby

    bertbaby Elite Member

    Joined:
    Apr 15, 2009
    Messages:
    2,019
    Likes Received:
    1,496
    Occupation:
    Product marketing
    Location:
    USA
    Home Page:
    Good share very, very interesting data but how to monetize? The other question is when does Facebook become a passing fad and irrelevant to the average marketer?