Part I · Chapter 2

Counting Friends

The simplest thing you can measure about a node is how many links it has. That one number already hides a rule that never fails and a paradox that surprises almost everyone: on average, your friends have more friends than you do.

Think of everyone you would wave to in the street. Now imagine every one of them doing the same, and drawing a line to each person they know. The result is a friendship network, and the first question you can ask about any person in it is the most obvious one: how many lines touch them?

In Chapter 1 that count had a name: the node’s degree. In a friendship network it is just the number of friends. In a road map it is how many roads meet at a junction. On the web it is how many links a page has. Let’s count some.

Interactive 2.1

Degree counter

Click two people (or drag between them) to make them friends. Click a line to end a friendship. Click empty space to add a person.

Add or cut any friendship you like and watch the two totals in the readout. The sum of everyone’s degree is always exactly twice the number of lines, and the number of people with an odd degree is always even. The bar chart on the side is the network’s degree distribution.

The handshake rule

Why is the total always exactly double? Think of each friendship as a handshake. Every handshake has two hands in it, one at each end. When you add up everyone’s degree, you are counting hands, so every handshake gets counted twice: once for each person in it.

sum of all degrees = 2 × number of links Read aloud: add up how many friends everybody has, and you get twice the number of friendships.

A sneaky consequence: since the total is even, the people with an odd number of friends must come in an even number. (A pile of odd numbers adds up to an even total only if there is an even count of them.) That is why, back in Chapter 1, a network can have zero, two or four odd nodes, but never one or three.

Key idea

Every link has two ends, so adding up all the degrees counts each link twice: the total is always even, and odd-degree nodes always come in pairs.

Not everyone is average

The average degree is simply that total divided by the number of people. But averages hide a lot. The bar chart in the figure, the degree distribution, shows the whole story: how many people have 1 friend, 2 friends, 3 friends, and so on. In many real social networks this distribution is lopsided: most people have a modest number of contacts and a few have a great many. Those few, the hubs, will turn out to matter enormously. The first surprise they cause is about you and your friends.

The friendship paradox

Ask a crowd of people two questions: “How many friends do you have?” and “On average, how many friends do your friends have?” In most networks the second answer comes out bigger. Not because people are modest, and not because they are unpopular, but for a reason that is pure arithmetic. The sociologist Scott Feld explained it in a 1991 paper with the memorable title Why your friends have more friends than you do.

See it happen at a party. One host knows everybody; the guests mostly know only the host and one other guest.

Interactive 2.2

Friendship paradox meter

Pick a network, then edit it: click two people to link or unlink them, click a line to cut it.

▲ my friends have more friends than me, on average▼ fewerno mark: equal
Network
At the party, eight of the nine people have friends who are more popular than they are; only the host does not. Now pick the Ring, where everyone has exactly two friends: the two bars become equal and the paradox vanishes. Then link a few ring members across the middle and watch it come back.

Why it happens: hubs are counted many times

Here is the trick. When you average “how many friends do my friends have”, every person is counted once for every friendship they are in. The host with eight friends appears on eight friends lists. A guest with two friends appears on only two. So the popular people are over-represented in the “friends” average, simply because they are on so many lists. If you pick a friendship at random and look at one end of it, you are far more likely to land on a hub than if you pick a person at random.

That bias can be written down exactly. If you average over every end of every friendship:

average friend’s degree = average degree + (spread of degrees)² ÷ average degree Read aloud: friends beat the average person by the variance of the degrees divided by the mean degree. That extra is zero only when everyone has exactly the same number of friends.
Careful

The paradox is a statement about averages. It does not say that every single person has less popular friends (the host at the party is the obvious exception), and it does not say anything about whether people are happy or sociable. It is a counting effect, and it appears whenever some nodes have more links than others.

A rule about averages sounds abstract, so let’s feel it as a sampling experiment. Below is a bigger network with a few hubs. Pick people at random and record their degree. Then use a different recipe: pick a random person, then pick one of their friends at random, and record that friend’s degree.

Interactive 2.3

Random person vs random friend

Press the two sampling buttons a few times each and compare the two rows of dots.

picked: a random personpicked: a random friend of a random person
The “random friend” row piles up further to the right, and its average sits well above the “random person” average. Same network, same people: the only difference is that following a friendship lands you on hubs far more often. This recipe (person first, then friend) gives a slightly different average from the formula above, which counts friendship ends; both always come out at least as large as the plain average.

This is more than a party trick. If you want to find the well-connected people in a network you cannot see, asking random people to name a friend is a cheap way to do it. A 2010 study by Nicholas Christakis and James Fowler of a flu outbreak at Harvard found that the friends of randomly chosen students tended to fall ill earlier than the randomly chosen students themselves: being better connected, they were exposed sooner. Chapter 10 uses the same idea to protect a whole network by vaccinating friends instead of random people.

Key idea

Following a link is a biased way of choosing a node: it lands on well-connected nodes in proportion to how connected they are.

Intuition check

In a school network, the average student has 5 friends, but the average friend (over every friendship end) has 8. What best explains the gap?

What you now see

  • A node’s degree is its number of links, and the degree distribution shows how degrees are spread across the network.
  • The handshake rule: all degrees add up to twice the number of links, so odd-degree nodes come in pairs.
  • The friendship paradox: on average, friends have more friends than people do, because hubs sit on many friends lists.
  • Following a link is a shortcut to hubs, a fact that will matter for finding influencers and for stopping epidemics.