# Focus: Shapley value

  
Game theory is a fascinating topic codifying and quantifying all sorts of interactions between stakeholders in a game. The most popular setup is the prisoner's dilemma but there is much more to it. Today, we will cover the **Shapley value** as I recently stumbled across this original yet relatively unknown concept.

## **Problem at stake**:

**Example 1:** In a salary negotiation, the employee presents their skills and what they bring to the company. But how much are these skills worth?

**Example 2:** In a joint venture, each founding company contributes expertise. What’s a fair way to distribute ownership or shares?

**Example 3:** Two or three telecom companies want to build a fiber network that would benefit all. What’s a fair way to split the costs?

When we think about these problems, most of us might guess: “You should ask for an X% raise because you deserve it,” but there is actually a theory for this.

Let’s explore the theory behind it.

## **Solution**:

This is known as a cooperative game, and there is only one breakdown function that meets a few conditions (more on this later).

The main idea: “Player A's fair reward is the average of their marginal contributions to the different coalitions leading to the final setup,” where:

For a game with 3 players (A, B, C), we define:

* Final setup: the final set of stakeholders S {A, B, C}
    
* Coalition: a subset of S
    
* Marginal contribution: Adding A to {A, B} is: Value {A, B, C} – Value {B, C}
    

Now, let’s introduce some values:

* V(A) = 12
    
* V(B) = 8
    
* V(C) = 2
    
* V(A, B) = 22
    
* V(A, C) = 15
    
* V(B, C) = 11
    
* V(A, B, C) = 23
    

![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiCHDcQfKDDZQImKzsxc7YN2bCaX7HBnYEpdnqpExA-_e4P5dDZ2KooFKjnn3OhmKnolV9aVHtkK5uRYN6p8l9SW-IA1F0nr0hAKzUj7GNaZNaQZWs1tlGhMPEixTylGm8o8ps6qXqsuLy/s640/page1.PNG align="left")

The Shapley value of A is calculated as:

![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC7ES0CUuVJIIB15Wgh1ovE1tOr-e2ZeItsKIbX62tVYtBCzSkkMYILbIZtrCNMx1Fdj-KXDxlXYKg574Y1aHxKesdv1ddIKfHrgZiBMmjonQIfEWzSX_ACyWZpKjUoEgpbyuJr8qOzYzs/s640/page2.PNG align="left")

## Generalization

From there, you can intuit the general formula where n! is the total number of permutations :  

![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOyHJKMJ_SEL1dBrlr-T3R4Yl-gq_8_roLEAAhq-3XT43rqF1YxldSH2NzMOXNJ5VsRJ1H17TE7UEWJw54W2yR7vlQ7Jug-9NzTiJ7XeYBHxxC9aX-fWU6PJj3k3vXQ7gPFYiAuTmpFrY5/s400/formula.PNG align="left")

Where K \\ A notes the coalition K without A.

What current problem can you apply the Shapley value to?
