m and u probabilities in the Fellegi-Sunter model

The previous article showed how partial match weights are used to compute a prediction of whether two records match.

However, partial match weights are not estimated directly - instead they are derived from two parameters known as the m and the u probabilities.

In addition to being essential for estimating match weights, the m and u probabilities have intuitive interpretations that allow us to understand linkage models and diagnose problems.

In this article, we will:

  • Define and explain m and u probabilities
  • Explain how they relate to Bayes Factors, and why Bayes Factors have an intuitive explanation
  • Show why we then translate Bayes Factors into partial match weights, for ease of computation

Motivating example

Imagine we have two records. We’re not sure whether they represent the same person.

Now we’re given some new information: we’re told that month of birth matches.

Is this scenario (comparison level) more likely among matches or non-matches?

  • Amongst matching records, month of birth will usually match
  • Amongst non-matching records month of birth will rarely match

Since it’s common to observe this comparison levelIn Splink, a model has a set of comparisons, each typically corresponding to a column in the input data such as name, date of birth etc. Each comparison has multiple comparison levels. A comparison level defines a category of similarity for that column e.g. an 'exact match' or a 'one character difference'. Each comparison level has an associated partial match weight. among matching records, but rare to observe it among non-matching records, this is evidence in favour of a match.

But how much evidence?

m and u probabilities and Bayes Factors

The strength of the evidence is quantified using the m and u probabilities. For each comparison level in the model:

  • The m probability measures how often the comparison level occurs among matching records:

    m=Pr(comparison levelrecords match)m = \text{Pr}(\text{comparison level}|\text{records match})

  • The u probability measures how often the comparison level occurs among non-matching records:

    u=Pr(comparison levelrecords do not match)u = \text{Pr}(\text{comparison level}|\text{records do not match})

What matters is the relative size of these values. This is calculated as a ratio known as the Bayes Factor1, denoted by KK.

Bayes Factor=K=mu=Pr(comparison levelrecords match)Pr(comparison levelrecords do not match)\text{Bayes Factor} = K = \frac{m}{u} = \frac{\text{Pr}(\text{comparison level}|\text{records match})}{\text{Pr}(\text{comparison level}|\text{records do not match})}

Bayes Factors provide the easiest way to interpret the parameters of the Fellegi Sunter model because they act as a relative multiplier that increases or decreases the overall prediction of whether the records match. For example:

  • A Bayes Factor of 5 can be interpreted as ‘5 times more likely to match’
  • A Bayes Factor of 0.2 can be interpreted as ‘5 times less likely to match’

Example 1: Evidence in favour of a match

For example, suppose we observe that month of birth matches.

  • Amongst matching records, month of birth will usually match. Supposing the occasional typo, we may have m=0.99m = 0.99
  • Amongst non matching records, month of birth matches around a twelth of the time, so u=1/12u = 1/12.

Bayes Factor=K=mu=0.990.0833=11.9\text{Bayes Factor} = K = \frac{m}{u} = \frac{0.99}{0.0833} = 11.9.

This means we observe this scenario around 11.9 times more often amongst matching records than non-matching records.

Hence, given this observation, the records are 11.9 times more likely to be a match. This is pretty intuitive since there are 12 months of the year.

More generally, we can see from the formula that strong positive match weights only possible with low u probabilities, implying high cardinalityCardinality is the number of distinct values in a column. For example, a first-name column has high cardinality because it can contain many distinct names, while a gender column has low cardinality because it contains only a few distinct values..

Example 2: Evidence against a match

Suppose we observe that gender does not match.

  • Amongst matching records, it will be rare to observe a non-match on gender. If there are occasional data entry errors, we may have m=0.02m = 0.02
  • Amongst non matching records, gender will not match around half the time. So u=0.5u = 0.5.

Bayes Factor=K=mu=0.020.5=0.04=125\text{Bayes Factor} = K = \frac{m}{u} = \frac{0.02}{0.5} = 0.04 = \frac{1}{25}.

We observe this scenario around 25 times more often among non-matching records than matching records.

Hence, given this observation the records are 25 times less likely to be a match.

More generally, we can see from the formula that strong negative match weights only possible with low m probabilities, which in turn implies high data quality.

Interpreting m and u probabilities

In addition to these quantitative interpretations, the m and u probabilities also have intuitive qualitative interpretations:

m probabilities

The m probability can be thought of as a measure of data quality, or the propensity for data to change through time.

For example, consider the scenario of an exact match on first name.

An m probability of 0.9 means that, amongst matching records, the first name matches just 90% of the time, which is an indication of poor data quality.

The m probability for an exact match on postcode may be even lower - but this may be driven primarily by people moving house, as opposed to data error.

u probabilities

The u probability is primarily a measure of the likelihood of coincidences, which is driven by the cardinality of the data.

Consider the scenario of an exact match on first name.

A u probability of 0.005 means that, amongst non-matching records, first name matches 0.5% of the time.

The u probability therefore measures how often two different people have the same first name - so in this sense it’s a measure of how often coincidences occur.

A column such as first name with a large number of distinct values (high cardinality) will have much smaller u probabilities than a column such as gender which has low cardinality.

Using Bayes Factors to compute probabilities

We’ve seen we can convert m and u probabilities into Bayes Factors, resulting in an intuitive interpretation that something is ’nn times more likely’.

What does it mean for a match to be nn times more or less likely? More likely than what?

It’s only meaningful to say that something is more or less likely relative to a starting probability - known as the ‘prior’ (our ‘prior belief’).

In the context of record linkage, the prior is our belief that the two records match before we saw the the information in the columns (e.g. before we looked at the record and saw that first names match).

Our updated belief given this new information is called the ‘posterior’.

Mathematically this can be written:

posterior odds=prior odds×Bayes Factor\text{posterior odds} = \text{prior odds} \times \text{Bayes Factor}

and odds can be turned into probabilities with the following formula:

probability=odds1+odds\text{probability} = \frac{\text{odds}}{1 + \text{odds}}

See the mathematical annex for further detail on these derivations.

For example, suppose we believe the odds of a record comparison being a match are 1 to 120. But now we observe the new information that month of birth matches, with a Bayes Factor of 12.

So posterior odds=1120×12=110\text{posterior odds} = \frac{1}{120} \times 12 = \frac{1}{10}

posterior probability=1101+110=1110.0909\text{posterior probability} = \frac{\frac{1}{10}}{1 + \frac{1}{10}} = \frac{1}{11} \approx 0.0909

So after observing that the month of birth matches, the odds of the records being a match would be 1 to 10, corresponding to a probability of approximately 9.1% (about 1 in 11).

Here’s a calculator which shows how a prior probability is updated with a Bayes Factor:

Posterior calculator

An alternative way of visualising these concepts can be found here.

The relationship between m and u probabilities, Bayes Factors and partial match weights

How do m and u probabilities and Bayes Factors relate to the partial match weights we explored in the previous article?

Partial match weights relate to Bayes Factors through a simple formula:

partial match weight=ω=log2(Bayes Factor)=log2(mu)\text{partial match weight} = \omega = \log_2 \text{(Bayes Factor)} = \log_2 (\frac{m}{u})

The log transform converts multiplicative Bayes Factors into additive match weights. We do this because:

  • it’s easier and more intuitive to represent match weights on charts because they tend to range from -30 to 30, whereas Bayes Factors can be tiny (one in a million) or massive (millions).
  • it makes the maths of the Fellegi Sunter model particularly simple: to compute the final match weight, just add up partial match weights

We can summarise this relationship with this chart:

A larger, standalone version is available here.

Next steps

Now that we have a firm grasp of these ingredients, we’re in a position to present the full mathematical specification of the Fellegi Sunter model.

Mathematical annex

In the main text we asserted that:

posterior odds=prior odds×Bayes Factor\text{posterior odds} = \text{prior odds} \times \text{Bayes Factor}

We can derive this formula from the m and u probabilities and Bayes Theorem.

Recall that Bayes Theorm is:

Pr(ab)=Pr(ba)Pr(a)Pr(b)\operatorname{Pr}(a|b) = {\frac{\operatorname{Pr}(b|a)\operatorname{Pr}(a)}{\operatorname{Pr}{(b)}}}

or in words:

posterior probability=likelihood×prior probabilityevidence\text{posterior probability} = \frac{\text{likelihood} \times \text{prior probability}}{\text{evidence}}

In the context of record linkage, we can describe these parts as:

Prior: The overall proportion of comparisons which are matches Pr(match)\operatorname{Pr}(\text{match})

Evidence: We have observed that e.g. first name matches, Pr(first name matches)\operatorname{Pr}(\text{first name matches})

Likelihood: The probability that first name matches amongst matches, given by Pr(first name matchesrecords match)\operatorname{Pr}(\text{first name matches}|\text{records match})

So Bayes’ formuls is:

Pr(matchfirst name matches)=Pr(first name matchesmatch)Pr(match)Pr(first name matches)\operatorname{Pr}(\text{match}|\text{first name matches}) = \frac{\operatorname{Pr}(\text{first name matches}|\text{match})\operatorname{Pr}(\text{match})}{\operatorname{Pr}{(\text{first name matches})}}

Which can also be written:

Pr(first name matchesmatch)Pr(match)Pr(first name matchesmatch)Pr(match)+Pr(first name matchesnon match)Pr(non match) \frac{\operatorname{Pr}(\text{first name matches}|\text{match})\operatorname{Pr}(\text{match})}{\operatorname{Pr}(\text{first name matches}|\text{match})\operatorname{Pr}(\text{match}) + \operatorname{Pr}(\text{first name matches}|\text{non match})\operatorname{Pr}(\text{non match})}

Using some of the terminology from the article this is the same as:

posterior probability=m×prior probabilitym×prior probability+u×(1prior probability)\text{posterior probability} = \frac{m \times \text{prior probability}}{m \times \text{prior probability} + u \times (1 - \text{prior probability})}

The formula for odds is:

odds=p1p\text{odds} = \frac{p}{1-p}

So we can write:

posterior odds=prior1priormu\text{posterior odds} = \frac{\text{prior}}{1 - \text{prior}} \frac{m}{u}

posterior odds=prior odds×Bayes Factor\text{posterior odds} = \text{prior odds} \times \text{Bayes Factor}

Footnotes

  1. You can read more about Bayes Factors here. The concept is quite similar to a likelihood ratio.