This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# PageRank: the math

Every time I get to read more about PageRank I run in serious issues with its math.

Briefly, the probabilistic interpretation of PageRank is invalid. See PageRank as a probability distribution.

According to Brin/Page paper from 1998, “The probability that the random surfer visits a page is its PageRank.” And “We assume page A has pages T1...Tn which point to it (i.e., are citations). The parameter d is a damping factor which can be set between 0 and 1... Also C(A) is defined as the number of links going out of page A. The PageRank of a page A is given as follows:

PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))

Note that the PageRanks form a probability distribution over web pages, so the sum of all web pages' PageRanks will be one.”

When I decided to implement the PageRank algorithm a few days ago, I quickly discovered that it should be (1-d)/n instead of (1-d). That's a typo, fine. But, after fixing this, I wasted half a day trying to figure out why the ranks still wouldn't add up to 1. Turns out, it was all a lie: they don't have to!

I don't understand now how I missed that. If there is only one page, its PageRank has to be 1-d. If there are two pages with T linked to A and nothing else, then we can assign: T=0 and A=(1-d)/2. They don't have to add up to 1!

Best one can say is this. If one uses the above formula for iteration and *starts with a distribution*, then yes, you will get a distribution after every iteration... But only if there are no link-less pages!

To get out of this trouble, there have been some tweaks suggested. Hard to tell which one is sillier:

- normalizing (dividing by the sum of all PageRanks) and
- assuming that no links means that the page links to
*every*page.

That's what happens when you try to make the data fit the model.

## PageRank's paradigm

After more than 10 years of usage, PageRank's paradigm is clear. The people who care about their PageRank – millions of web site owners – understand what it is about. It isn't about probability. PageRank is about passing something valuable from a page to the next along its links. This something has been called popularity, significance, authority, “link juice”, etc.

So, PageRank shows who, after all this “redistribution of wealth”, ends up on top. This seems to make quite a lot of sense, doesn't it?

Unfortunately, the actual computations lead to problems.

In the presence of cycles of links, the algorithm diverges to infinity. This lead to the introduction of the damping factor, which didn't prevent the gaming of the algorithm. Google's answer was: surreptitious tweaking, attempts to evaluate the “quality” of sites, manual interventions, on and on.

Even though this problem certainly isn't a new discovery, the myth clearly lives on: Wikipedia says “PageRank is a probability distribution used to represent the likelihood that a person randomly clicking on links will arrive at any particular page.” It then proceeds to give an example in the next section that isn't a distribution.

I've learned my lesson: bad math simply doesn't deserve mathematical analysis. Once it's determined that the idea is bad math, you know it's a dead end! Instead, try to find an alternative. See Acyclic ranking…

One last time...