The Gini Index: How to Measure SEO Traffic Concentration (with R code)

Ever noticed how just a handful of pages on your site get the lion’s share of traffic?
The homepage, the blog, the product page — and then a long tail of pages that together weigh less than those few.

It’s the Pareto principle, we know it well. But “80% of traffic comes from 20% of pages” is a heuristic, not a measurement.
How do we know if our site is more or less concentrated than average? And what if we want to compare two sites — or the same site at two different points in time?

We need an index that quantifies concentration in a single number.
A number that equals 0 when everything is evenly distributed, and 1 when a single page takes it all. In between, the space of all real distributions.

That number exists. It’s called the Gini index, and it measures the concentration of a transferable quantitative variable (a quantity that can be redistributed without changing its total: income, traffic, market share). It was introduced in 1912 by the Italian statistician Corrado Gini specifically to study inequality in income distribution.
Since then, it has become one of the most widely used indicators in economics, sociology — and yes, in SEO analysis too.

Let’s see how it works.

Continue reading “The Gini Index: How to Measure SEO Traffic Concentration (with R code)”

Contingency Tables and Conditional Probability

Have you ever noticed how mobile users behave differently from desktop users? It’s not just a feeling — it’s a relationship between two categorical variables. The variable “device” (mobile or desktop) and the variable “converted” (yes or no) — when we cross them in a table, we can see if there’s a systematic link.

Contingency tables (also called two-way tables or cross-tabulations) are the basic tool for this. They allow us to evaluate the interaction between two categorical variables and to quantify conditional probability — how likely an event is “given that” another has occurred.

The question about mobile vs desktop differences, for example, translates into a conditional probability: is P(conversion | device = mobile) different from P(conversion | device = desktop)? If yes, there’s a relationship. If not, the two variables are independent.

Let’s see how this works, starting with a deliberately light-hearted example.

Continue reading “Contingency Tables and Conditional Probability”

Poisson Distribution: predicting leads, clicks and anomalies (with R and Python)

The Poisson distribution is a discrete probability distribution that describes the number of events occurring in a fixed interval of time or area.

The Poisson distribution is useful for measuring how many events can occur within a given time horizon, such as the number of customers entering a shop in the next hour, or the number of pageviews on a website in the next minute, and so on.

The Poisson Distribution: Siméon-Denis Poisson
Siméon-Denis Poisson

Continue reading “Poisson Distribution: predicting leads, clicks and anomalies (with R and Python)”

A Brief (Personal) Manifesto for SEO

The need I feel—the fruit of many years working in this field—is to affirm the decisive importance of basic scientific rigour in analysing traffic data, so that we can calibrate our SEO interventions with accuracy, and not merely “by gut feeling” (even though feelings do matter!).

The tools available to the SEO professional are countless, and yet it is undeniable that a sense of disappointment lingers within us. Too often we deal with data of apparent strategic importance that turn out, when put to the test, to be fallacious or imprecise—mere red herrings.

Continue reading “A Brief (Personal) Manifesto for SEO”