Video 1, chapter 11

The Friendship Paradox

How the friendship paradox compares the friend count of a random person with that of a random entry on all friend lists, and why size-biased sampling puts that average at or above the average degree of a social network.

  • Video 1, chapter 11
  • What random really means

Video 1, chapter 11

People sometimes say that your friends have more friends than you do. Taken literally as a claim about every person, this is false, yet a precise version of it holds in every network in which people do not all have the same number of friends. The difference lies in what is being averaged, a person chosen at random or a friend chosen at random from everyone’s friend lists. This page computes both averages for a small network, shows why the second is never smaller than the first, and marks what the statement does not say about any individual.

Key terms

Friendship paradox

Definition Take a social network of nn people with at least one friendship, in which every friendship is mutual, and write did_i for the number of friends of person ii. Compare two ways of choosing someone at random. In the first, choose one of the nn people, each with probability 1/n1/n, and record that person’s number of friends. In the second, write out every person’s list of friends, pool all the entries, choose one entry with equal probability, and record the number of friends of the person named in that entry. Each friendship puts one entry on each of two lists, so the pool has d1+⋯+dnd_1 + \cdots + d_n entries, and person jj is named in it exactly djd_j times. The averages of the recorded numbers are

mperson=d1+⋯+dnn,mfriend=d12+⋯+dn2d1+⋯+dn.\begin{aligned} m_{\text{person}} &= \frac{d_1 + \cdots + d_n}{n}, \\[0.4em] m_{\text{friend}} &= \frac{d_1^2 + \cdots + d_n^2}{d_1 + \cdots + d_n}. \end{aligned}

The friendship paradox is the fact that mfriend≥mpersonm_{\text{friend}} \ge m_{\text{person}} in every such network, with equality exactly when everyone has the same number of friends. A person with no friends counts in the person average with 00 friends and is never named in the pool. The statement is about these two averages. It does not say that every person has fewer friends than their own friends have on average, or even that most people do. The sociologist Scott Feld described the effect in 1991.

In plain words Someone with many friends appears on many friend lists, and someone with one friend appears on only one. Choosing from the lists therefore favors well-connected people, so the friend you land on tends to have more friends than a person chosen at random.

Example In a star network, one person, the hub, is friends with four others, and those four are not friends with each other. The friend counts are 4,1,1,1,14, 1, 1, 1, 1, which add to 88, so

mperson=85=1.6.m_{\text{person}} = \frac{8}{5} = 1.6.

Each of the four others has a list naming only the hub, and the hub’s list names the four others. The pool has 88 entries, the hub is named 44 times and each other person once, so the recorded counts are 4,4,4,4,1,1,1,14, 4, 4, 4, 1, 1, 1, 1. They add to 2020, and

mfriend=208=2.5.m_{\text{friend}} = \frac{20}{8} = 2.5.

Four of the five people have fewer friends than their friends have on average, since each has a single friend with 44 friends. The hub is the exception, with 44 friends whose average number of friends is 11.

Social network

Definition In mathematics a social network is modeled as a graph. The people are the vertices, and each friendship is an edge joining two different people. Friendship here is mutual, so the edges have no direction, and two people either are friends or are not, so no pair is joined by two edges and nobody is joined to themselves. A graph with these properties is called a simple undirected graph. The friend list of a person is the list of people joined to that person by an edge.

In plain words Draw a dot for each person and a line between every two people who are friends. Everything the friendship paradox uses can be read off that drawing.

Example Five people stand in a circle, and each is friends with the two people beside them and with nobody else. The graph has 55 vertices and 55 edges. Every friend list has two names, so the pooled lists have 1010 entries, and each person is named in exactly two of them.

Average degree

Definition The degree of a person in a social network is that person’s number of friends, which is the number of edges at that vertex. Each edge has two ends, one at each of the two friends, so adding all the degrees counts every edge twice,

d1+⋯+dn=2f,d_1 + \cdots + d_n = 2f,

where ff is the number of friendships, that is, of edges. This is the handshake lemma. The average degree is the person average mperson=2f/nm_{\text{person}} = 2f/n. A person with no friends has degree 00 and counts in it. If such people are left out, the average over everyone else is larger, but it is still at most mfriendm_{\text{friend}}, with equality exactly when everyone left has the same degree.

In plain words The average degree is the average number of friends per person, and it equals twice the number of friendships divided by the number of people.

Example The star has 44 edges and 55 people, so its average degree is 2⋅4/5=1.62 \cdot 4/5 = 1.6. The circle of five has 55 edges and average degree 2⋅5/5=22 \cdot 5/5 = 2. Every person in the circle has degree 22, so each of the 1010 pooled entries records a 22 and mfriend=20/10=2m_{\text{friend}} = 20/10 = 2 as well. A network in which everyone has the same degree is called regular. In a regular network the two averages agree, and nobody has fewer friends than their friends have on average.

Size-biased sampling

Definition Suppose each member ii of a finite population of nn members has a size xi≥0x_i \ge 0, and the sizes have a positive total. Size-biased sampling chooses member ii with probability xi/(x1+⋯+xn)x_i / (x_1 + \cdots + x_n), in proportion to its size, so members of size 00 are never chosen. The average size of the chosen member is

x12+⋯+xn2x1+⋯+xn=μ+σ2μ,\frac{x_1^2 + \cdots + x_n^2}{x_1 + \cdots + x_n} = \mu + \frac{\sigma^2}{\mu},

where μ\mu is the ordinary average of the sizes and σ2\sigma^2 is their variance, the average of the squared distances (xi−μ)2(x_i - \mu)^2. Since σ2≥0\sigma^2 \ge 0, the size-biased average is at least μ\mu, and it is larger exactly when the sizes are not all equal. Choosing an entry from the pooled friend lists is size-biased sampling of people with degree as the size, which is why the friendship paradox holds.

In plain words When the chance of being caught grows with size, what you catch is bigger than average. The excess is the spread of the sizes divided by their average, so the more the sizes vary, the larger the bias.

Example In the star the hub has probability 1/51/5 of being chosen as a person but 4/8=1/24/8 = 1/2 of being chosen from the pooled lists. The degrees 4,1,1,1,14, 1, 1, 1, 1 have average μ=1.6\mu = 1.6. Their squared distances from 1.61.6 are 5.765.76 for the hub and 0.360.36 for each of the others, so

σ2=5.76+4⋅0.365=1.44.\begin{aligned} \sigma^2 &= \frac{5.76 + 4 \cdot 0.36}{5} \\[0.4em] &= 1.44. \end{aligned}

The formula gives 1.6+1.44/1.6=1.6+0.9=2.51.6 + 1.44/1.6 = 1.6 + 0.9 = 2.5, the friend average found before.

Check yourself

  1. Start from the circle of five people, numbered 11 to 55 around the circle, and add one friendship between persons 11 and 33, who were not neighbors. Find the person average and the friend average. Who now has fewer friends than their friends have on average?
Show the answer

Persons 11 and 33 now have 33 friends each, and persons 22, 44 and 55 have 22 each. The degrees add to 1212, which is twice the 66 edges, so the person average is 12/5=2.412/5 = 2.4. The squares add to 9+9+4+4+4=309 + 9 + 4 + 4 + 4 = 30, so the friend average is

mfriend=3012=2.5.m_{\text{friend}} = \frac{30}{12} = 2.5.

It is larger because the degrees are no longer all equal.

Person 22 has friends 11 and 33, with 33 friends each, an average of 33. Person 44 has friends 33 and 55, an average of (3+2)/2=2.5(3 + 2)/2 = 2.5, and person 55 has friends 44 and 11, also an average of 2.52.5. These three have fewer friends than their friends have on average. Person 11 has friends 22, 33 and 55, with an average of 7/3≈2.337/3 \approx 2.33 friends, which is less than 33, and person 33 is in the same position. So three people are below their friends’ average and two are above it.

  1. In the star, choose one of the five people with equal probability, and then choose one of that person’s friends with equal probability. What is the expected number of friends of the friend you end up with? Is it the friend average 2.52.5?
Show the answer

With probability 4/54/5 the first choice is one of the four others, whose only friend is the hub, so the friend has 44 friends. With probability 1/51/5 the first choice is the hub, and any friend chosen has 11 friend. The expected number is

45⋅4+15⋅1=175=3.4.\frac{4}{5} \cdot 4 + \frac{1}{5} \cdot 1 = \frac{17}{5} = 3.4.

It is not 2.52.5. This two-step procedure lands on the hub with probability 4/54/5, while choosing from the pooled lists lands on the hub with probability 1/21/2, so the two procedures weight people differently. In every network in which everyone has at least one friend, the two-step average is also at least the person average, but in general it differs from mfriendm_{\text{friend}} and can be larger or smaller than it. A statement about one procedure should not be quoted with the number from the other.

  1. Extend the star so that the hub has kk friends, none of whom are friends with each other, for some k≥2k \ge 2. Find both averages as formulas in kk, and evaluate them for k=99k = 99.
Show the answer

There are k+1k + 1 people and kk edges. The hub has degree kk and everyone else has degree 11, so the degrees add to 2k2k and their squares add to k2+kk^2 + k. Therefore

mperson=2kk+1,mfriend=k2+k2k=k+12.\begin{aligned} m_{\text{person}} &= \frac{2k}{k + 1}, \\[0.4em] m_{\text{friend}} &= \frac{k^2 + k}{2k} = \frac{k + 1}{2}. \end{aligned}

For k=99k = 99 these are 198/100=1.98198/100 = 1.98 and 100/2=50100/2 = 50. The person average stays below 22 for every kk, while the friend average grows without bound, because kk of the 2k2k entries in the pooled lists, exactly half, name the hub, who has kk friends. All kk people other than the hub have fewer friends than their one friend, and only the hub has more friends than its friends have on average. With k=1k = 1 the network would be a single pair of friends, both averages would equal 11, and there would be no paradox.