FLASH SALE! - "FINANCIAL MODELING COURSE BUNDLE AT 60% OFF" Enroll Now

# Shapley Value

Updated on January 31, 2024
Article byPrakhar Gajendrakar
Edited by
Reviewed byDheeraj Vaidya, CFA, FRM

## Shapley Value Definition

Shapley value is a system that determines the contribution of an individual player when two or more players work in collaboration with each other. The individual payoff is determined based on the unequal contribution of each player.

For eg:
Source: Shapley Value (wallstreetmojo.com)

The Shapley method provides equal or justified credit to the rightful participant—the one with a high volume of contribution. The Shapley value solution is applied in business, AI, machine learning, programming, Python, and marketing.

### Key Takeaways

• Shapley value is the derivation of the applied cost and gained profit—distributed equally among the players—based on individual contribution.
• In machine learning, Shapley values employ game theory to identify the exact contribution of each player. In addition, the Shapley method explains projections made by nonlinear models.
• In Python, Shapley value functions are used to interpret machine learning models.
• For Shapley value calculation, Lloyd Stowell Shapley introduced the Shapley value game theory to all player combinations. To achieve this, the average marginal contribution is determined.

### Shapley Value Explained

The Shapley value game theory was introduced by Lloyd Stowell Shapley in 1951. In 2012, Shapley won the Noble memorial prize for his contribution to Economic Sciences. He was an American mathematician who conducted extensive research on game theory.

Game theory models the interaction between multiple players in any scenario with specific rules and quantifiable consequences. They are used to analyze situations involving decision-making with limited resources, outcomes resulting from different choices, and the possibility of competition or collaboration between players.

For eg:
Source: Shapley Value (wallstreetmojo.com)

Whenever more than two players are involved in a process, participants collaborate. As a result, each player expends a level of skill, ability, and performance. But it is hard to compute the individual payoff achieved through collaboration. This is where the Shapley method comes in. This solution is applied to determine which player contributed more. Specifically, it determines if a particular player’s efforts brought them closer to the goal or not.

The Shapley model comprises a team of players collaborating to attain overall gain. Some players contribute more and some less. Since the contribution is unequal, how much should each player get in return? The Shapley method gives a numerical answer to that problem. Further, players do have an idea of who is contributing how much. As a result, players who contribute more have more bargaining power.

Shapley value calculation is done by measuring the average difference from all combinations. The Shapley value is the average marginal contribution of a player in an aggregation of all possible combinations.

The Shapley solution solves complex group coalitions; it determines individual payoffs and performance. Thus, credit distribution is made easy—it is a fair system—the player who contributes more (towards the outcome) gets more credit.

The Shapley method has a distinctive advantage; it accounts for unquantifiable factors. For example, when the cooperation between two or more players is analyzed, factors like teamwork, cooperation, or proactive attitude cannot be measured in values. As a result, the Shapley solution is widely applied in studying economic models, market mix models, tort damage calculations, and product line distributions.

###### Financial Modeling & Valuation Courses Bundle (25+ Hours Video Series)

–>> If you want to learn Financial Modeling & Valuation professionally , then do check this ​Financial Modeling & Valuation Course Bundle​ (25+ hours of video tutorials with step by step McDonald’s Financial Model). Unlock the art of financial modeling and valuation with a comprehensive course covering McDonald’s forecast methodologies, advanced valuation techniques, and financial statements.

### Example

Let us look at an example to understand the Shapley method.

Julia opens a new store—she sells handmade jewelry and accessories. Her store is located in New York. As a result, she gets considerable exposure. Even so, Julia wants to do extensive marketing and advertising for her products.

Within two weeks, her store gets crowded. To analyze the success, Julia can apply the Shapley system to isolate successful marketing channels, key players, and visitor demographics. Thus, Jula can determine which player contributed the most towards the footfalls—and the individual roles played by various marketers.

Julia can also narrow down a particular marketing channel based on the Shapley value calculations. She can cut her marketing budget by removing other marketing channels.

### Interpretation

To interpret the Shapley concept, let us consider a manufacturing facility that makes linen shirts.

A set of teams does the manufacturing. Each team is further made up of four employees. The first group comprises Ambrose, Billy, Cathy, and Donna.

Every month the first team manufacture X number of shirts; the company owner is happy with the employee’s contribution and wants to reward them with a distribution based on performance.

For performance-based incentives, the management has to determine the contribution of a particular employee in the manufacturing of X number of shirts. But the interpretation of individual contribution is tricky—certain factors are unquantifiable—cooperation, teamwork, division of labor, mutual understanding, or proactive attitude.

As a result, the management applies the Shapley method. Then, they follow the following steps:

• First, they determine how many shirts were produced by the entire team (in a month).
• Then the focus shifts toward each player. For example, say the appraisal starts with Billy. Then the analysis excludes Billy and considers all possible subsets. In this case, the contribution of Ambrose, Cathy, and Donna is analyzed.
• In total, eight different subsets are constructed. Next, the marginal value of each subset is calculated. Finally, this value is compared to the marginal values of other constructed subsets.

1. How to calculate the Shapley value?

Shapley value is calculated by measuring the average mean of differences observed from all player combinations. To achieve this, the average marginal contribution is determined.

2. What is the Shapley value in machine learning?

In machine learning, Shapley values are used to explain projections made by nonlinear models. The Shapley method highlights the features that contribute to the prediction. The Shapley method takes account of each data set (player). It takes one piece of data from it and applies it in combination with other data from another data set (player). Ultimately, we arrive at a single value—the average marginal contribution.

3. What is the Shapley value in Python?

Shapley value regression functions in Python are used to interpret machine learning models. It facilitates the easy distribution of calculations and payoffs. If there is a model where predictions are known, then the Shapley solution can be applied to find the difference between the actual value and the predicted value.

This article has been a guide to Shapley Value and its definition. Here, we explain its interpretation, along with an example. You can learn more about it from the following articles –