Sociologists began hunting for ongoing, real-life situations in which better data could be found. A 2000 study of dorm mates at Dartmouth College by the economist Bruce Sacerdote found that they appeared to infect each other with good and bad study habits — such that a roommate with a high grade-point average would drag upward the G.P.A. of his lower-scoring roommate, and vice versa. A 2006 Princeton study found that having babies appeared to be contagious: if your sibling has a child, you’re 15 percent more likely to have one yourself in the next two years. These were tantalizing findings, but again, each was too narrow to really indicate whether and how the effect worked in the mass public. What was needed was something more ambitious, some way of mapping out the links between thousands of real-life people for years — decades, even — to see whether, and how, behaviors spread.

NICHOLAS CHRISTAKIS BEGAN taking a new look at this question in 2000 after an experience visiting terminally ill patients in the working-class neighborhoods of Chicago. Christakis is a medical doctor and sociologist at Harvard; back then, he was posted at the University of Chicago and, at the age of 38, he had made a name for himself studying the “widowhood effect,” the well-known propensity of spouses to die soon after their partners’ deaths. One of his patients was a terminally ill elderly woman with dementia who lived with her daughter as her main caregiver. The daughter was exhausted from caring for her mother for months; the daughter’s husband, in turn, was becoming ill from coping with his wife’s extreme stress. One night after visiting the dying mother, Christakis arrived back at his office and got a phone call from a friend of the husband, asking for help, explaining that he, too, was feeling overwhelmed by the situation. The mother’s sickness had, in effect, spread outward “across three degrees of separation,” Christakis told me. “This illness affects the daughter, who spreads to the husband, who spreads to the friend, the guy who calls me up,” he added. He began talking to colleagues, wondering how he could further study the phenomenon.

In 2002, a common friend introduced him to James Fowler, at the time a Harvard political-science graduate student. Fowler was researching the question of whether the decision to vote in elections could spread virally from one person to another. Christakis and Fowler agreed that social contagion was an important area of inquiry and decided the only way to settle the many unanswered questions surrounding it was to find or compile a huge data set, one that tracked thousands of people. At first, they figured they would mount their own survey. They asked for $25 million from the National Institutes of Health to track 31,000 adults for six years, but the N.I.H. said they had to find some preliminary evidence first. So they went on the hunt for an existing collection of data. They weren’t optimistic. While several large surveys of adult health exist, medical researchers have no tradition of thinking about social networks, so they rarely bother to collect data on who knows whom — which means there’s no way to track whether behaviors are spreading from person to person. Christakis and Fowler examined study after study, discarding each one.

Christakis knew about the Framingham Heart Study and arranged a visit to the town to learn more. The study seemed promising: he knew it had been underway for more than 50 years and had followed more than 15,000 people, spanning three generations, so in theory, at least, it could offer a crucial moving picture. But how to track social connections? During his visit, Christakis asked one of the coordinators of the study how she and her colleagues were able to stay in contact with so many people for so long. What happened if a family moved away? The woman reached under her desk and pulled out a green sheet. It was a form that staff members used to collect information from every participant each time they came in to be examined — and it asked them to list all their family and at least one of their friends. “They asked you, ‘Who is your spouse, who are your children, who are your parents, who are your siblings, where do they live, who is your doctor, where do you work, where do you live, who is a close friend who would know where to find you in four years if we can’t find you?” Christakis said. “And they were writing all this stuff down.” He felt a jolt of excitement: he and Fowler could use these thousands of green forms to manually reconstruct the social ties of Framingham — who knew whom, going back decades.

Over the next few years, Christakis and Fowler managed a team that painstakingly sifted through the records. When they were done, they had a map of how 5,124 subjects were connected, tracing a web of 53,228 ties between friends and family and work colleagues. Next they analyzed the data, beginning with tracking patterns of how and when Framingham residents became obese. Soon they had created an animated diagram of the entire social network, with each resident represented on their computer screens as a dot that grew bigger or smaller as he or she gained or lost weight over 32 years, from 1971 to 2003. When they ran the animation, they could see that obesity broke out in clusters. People weren’t just getting fatter randomly. Groups of people would become obese together, while other groupings would remain slender or even lose weight.

And the social effect appeared to be quite powerful. When a Framingham resident became obese, his or her friends were 57 percent more likely to become obese, too. Even more astonishing to Christakis and Fowler was the fact that the effect didn’t stop there. In fact, it appeared to skip links. A Framingham resident was roughly 20 percent more likely to become obese if the friend of a friend became obese — even if the connecting friend didn’t put on a single pound. Indeed, a person’s risk of obesity went up about 10 percent even if a friend of a friend of a friend gained weight.