Breaking Down Bayes’ Theorem for Fair Lending

New Call-to-action

Breaking Down Bayes’ Theorem for Fair Lending

Institutions such as the Consumer Financial Protection Bureau (CFPB) and Visible Equity use what is known as the Bayesian Improved Surname Geocoding (BISG) method to assign probabilities of race to a person. As the name implies, the BISG method uses Bayes’ Theorem for this calculation. You’ve probably seen Bayes’ Theorem referenced in previous Visible Equity blogs, but what is it exactly?

Let’s break down Bayes’ Theorem to understand where it came from, what it’s doing, why it’s useful, and why it’s beautiful. Say we are interested in understanding the probability of event A occurring. Now let’s say we have some useful information in the form of event B that can help give us insight into event A. With this added information from B, we are ultimately interested in the conditional probability , which we read as “the probability of A given B” (or rather, the probability of event A occurring given event B has occurred).

The definition of a conditional probability is


If we multiply both sides of this equation by , then we can isolate (the upside down U stands for “intersect” or “and,” so we are looking for the probability of both A and B occurring) . And since , it follows that   Thus, we can rewrite the original conditional probability definition as


This is Bayes’ Theorem. The beauty of this theorem lies in the fact that we can find the desired conditional probability, , by switching the condition. Notice how on the left side of the equation we have , and on the right side we have . So if we can find these pieces, , , and , then we can obtain our desired probability !

Let’s manipulate the denominator of the right side a little bit. The Law of Total Probability states that . This says that we can find the probability of an event by breaking it down to conditional probabilities. Thus, we can rewrite Bayes’ Theorem as


Note that  is the probability of event A not occurring, which is simply , and  is the probability of event B occurring given that event A did not occur.

The unconditional probability is called the prior. The name comes from the fact that this is the probability of A before we have any additional information from B. This is the piece where we have a lot of control. On the other hand, , the probability we ultimately want, is the probability of A after the added information from B; thus, it is known as the posterior.

Let’s do a simple problem using Bayes’ Theorem. Suppose you have two bags. Assume the probability of choosing bag one is 50%, so the probability of choosing bag two is also 50%. In bag one, there are five red balls and five blue balls. In bag two, there are three red balls and seven blue balls. You put on a blindfold and pull a ball from one of the two bags at random. The ball is red. What is the probability that the red ball came from bag one?

First, what is the probability we want? If we just wanted to know the probability of choosing bag one, we already know that it is 50%. But you were blindfolded and chose a red ball, so that probability has updated. It’s the probability of pulling from bag one given you pulled a red ball, . This is a conditional probability, so let’s go to Bayes’ Theorem to help out. With Bayes’ Theorem, we get


Do we have the pieces needed for this calculation? We certainly do. We have


This results in . Not too bad.

Now we’ll apply Bayes’ Theorem to finding race probabilities for fair lending where we know a person’s surname. The probability we are interested in is . So using Bayes’ Theorem, we get

So the three pieces we need are , , and .

We can find by using data from the U.S. census.

Again, using the Law of Total Probability, . As stated previously, we can get from the census, and it follows that we can also get from the census. All we need now is .

If you recall, is the prior, that is, this is the probability of race before we know the person’s surname. This is where the person’s location comes into play. If we know the person’s address, then we can find his/her census tract, which gives us the counts of each race in the area. Using these counts, we can get the probability of race in the area. (See our recent blog Improving the Bayesian Improved Surname Geocoding Method on how Visible Equity has further improved these calculations by way of the prior, .) If we do not have the person’s address, we could use the national level probabilities of races. Once we have , it follows that is simply . Thus, we have all the pieces to calculate our posterior.

We’ll do one last example. Suppose we want to find the probability of Alex Jackson’s being white. Then

According to census data, we know that (of all people who claimed white on the census, 0.17% had the surname Jackson) and . Let’s say Alex comes from a census tract where 30% of the people are white. Then . When we throw these numbers into Bayes’ Theorem we get


Now we can all appreciate the power and beauty of Bayes’ Theorem.


Keaton Baughan

Product Manager