Sunday, December 10, 2023

Friends

I just read an article in an old The Helix magazine that said: on average your friends have more friends than you do.

It is true, and maybe even obvious to some people, but I thought I'd have a go at modelling it. 

Firstly, I'm thinking the log normal distribution is a good estimation of how many friends people have. It is a one parameter family based on the standard deviation σ of the normal distribution that it is the log of. 

I use log normal because nobody has a negative number of friends, and a few people have hundreds or thousands of friends. So it is a skewed distribution. It isn't a Poisson distribution though because the tail isn't that thick. Here is the log normal distribution shown for σ = 0.5:

Note that the horizontal scale is arbitrary, the peak above could represent 1 friend or 100 friends.

The mean of a log normal distribution is exp(σ^2 / 2)

To see the distribution of your friend's friends you need to multiply the log normal PDF by x, because the more friends the person has (larger x) the more likely you are to be friends with them. 

The mean of this distribution is exp(3 * σ^2 / 2). σ^2 being the variance. 

The ratio of these two means represents how many more friends your friends have than you do. This is simply exp(σ^2):

This value depends a lot on the unknown parameter σ. If we have a diverse number of friends then it will potentially be very large, starting to grow rapidly for σ > 1.

Either way, the ratio is always > 1 so this model supports the claim. 

The magazine cited Facebook data that 85% of people's friends have more friends than them. Presumably one could work backwards to estimate σ for this case. But σ=0.5 looks like a reasonable distribution for number of real friends, and that gives your friends 28% more friends than you have. 

For a wider range σ=1 your friends have e times as many friends as you do!