## Guest Blog

**Celebrating Diversity: The Math Behind It All ….**

**by Richard Berger****Manager, WebApplications at Castlight Health and VP, Engineering/Lead Developer at 4Spires, Inc.**

Why would I write about diversity? Well, it turns out that there are lots of reasons ….

1. Someone suggested it - and yes, I welcome suggestions, I don’t have that many ideas, and to be very honest - I am quickly running out and I don’t write well under pressure. Of course, I don’t write that well when I am NOT under pressure either.

2. My wife has started a diversity and inclusion consulting business - shameless plug for Exponential Talent - but hey, the more she works, the less time she has for me, the more time I have for work, so it is in every Castlighter’s best interest to send work her way.

3. There is MATH involved - and that is really the purpose of this blog, a chance to do some math.

Many of you can stop reading now - I won’t be insulted - but certain people should continue although they are probably both already very familiar with the result. Oh a warning - this is NOT going to be funny (and in retrospect, the math doesn’t really get too messy until the end, so you can probably make to through the next few paragraphs - I guarantee you will learn at least one thing).

So why is it that diverse groups of people make better decisions than non-diverse groups (*). Informally, there are two factors to making good decisions - the obvious one being the skill of the individuals making the decision - the non-obvious one being the diversity of thoughts leading into the decision. While not immediately obvious that diversity is valuable, the intuition behind it is that when a diverse group (thinking independently - an important assumption) makes errors, some of those errors “cancel out."

To prove this, we imagine a problem that has an answer numerically correct answer - such as “how many JIRA ticket were opened in October 2014” and that we have 3 people who are going to guess this number. And let’s say those guesses are (in thousands):

- A - 10
- B - 5
- C - 3

The Crowd’s guess, or C - is simply the average the average of the numbers or 6.

The Crowd’s error is C - R, where R is the right answer (to be revealed as soon as I figure it out). Well, the Crowds error isn’t actually C - R, it is going to be the square of C - R, which we will write as (C - R)^2. Now, why on earth do we square this.? No, it is not just to make the math harder and the nerds feel better, it is to turn all the numbers positive because we are really measuring the distance from the right answer. We could use good old absolute value, but that makes the math harder. So the Crowd’s error is actually going to be (C - R)^2.

The average individual error is going to be, well, the average of all the individual’s errors. Well, what is each individual’s error.

- A’s error is: 10 - R
- B’s error is: 5 - R
- C’s error is: 3 - R

So we will take those three errors, square them and then divide by three to get the average error. Now this average error stands for the expertise in the group. The smarter/better/faster these folks are, the lower the average error.

Finally the last element is the Crowd’s diversity is how far away the answer of each individual was from the average of the Crowd. The more widely distributed the answers are, the more diverse the crowd. If everyone thinks the same way, everyone answers the same way and the diversity is 0. So let’s look at our crowd of 3. Their average (C) was 6 as seen above. A was off by 4, B was off by 1, and C was off by 3. And to get the Crowd’s Diversity, we will of course square each of those numbers, add them up, and divide by three. That gives us 16 + 1 + 9 = 26/3 = 8 2/3

So now let’s go figure out (or make up as the case may be) the actual answer to this question. It is 12,343 which we will round to 12,000, or for the sake of our example 12. Note: My first guess was 10,000 because it turns out that, well, I am an excellent guesser. And apparently I add diversity to any group as I am the only one at Castlight from my home planet.

In any case, with R = 12 in hand, let’s figure out the “wisdom of the crowd”:

- Crowd error = (6-12)^2 = 36 (no negative numbers for us)
- Average individual error = (10-12)^2 + (5-12)^2 + (3-12)^2 = 4 + 49 + 81 = 134 and dividing that by 3 = 44 2/3.
- And recall that diversity = 8 2/3

Crowd Error (the thing we want to minimize) = Average Individual Error (smartness of people) - Diversity

Or in our JIRA case…

36 = 44 2/3 - 8 2/3

... Which is true! Our theorem is proved. OK, not really, in fact, not at all. That is just one example. But you get the point, to minimize crowd error you can try to minimize individual error - find super smart people AND/OR add diversity to your group. Or you can add me, since I have really high SAT scores - in fact, I am #2 in my planet’s history.

Now, to show how smart I am, or at least how well I can Google, I will go through the proof of the general case. Now, there is no way for me to type all the math, so I have to write it by hand and take pictures. Which, I believe, will be the VERY FIRST pictures I have taken on my phone.

(*) Under certain circumstances, which I forget right now, but turn out to be pretty reasonable - such as “there is a right answer” and “people are actually thinking independently."