ArticleslgStudy

science

Shapley value

Shapley value is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Shapley value rather than just read about it. In short: In cooperative game theory, the Shapley value is a method (solution concept) for fairly distributing the total gains or costs among a group of players who have collaborated. For example, in a team project where each member contributed differently, the Shapley value provides a way to determine how much credit or blame each member deserves.

Shapley value — main illustration
Shapley value — illustration

Key takeaways

  • Shapley value belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Shapley value to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Shapley value from memory before moving on to harder problems.

Reference excerpt

In cooperative game theory, the Shapley value is a method (solution concept) for fairly distributing the total gains or costs among a group of players who have collaborated. For example, in a team project where each member contributed differently, the Shapley value provides a way to determine how much credit or blame each member deserves. It was named in honor of Lloyd Shapley, who introduced it in 1951. The Shapley value determines each player's contribution by considering how much the overall outcome changes when they join each possible combination of other players, and then averaging those changes. In essence, it calculates each player's average marginal contribution across all possible coalitions. It is the only solution that satisfies four fundamental properties: efficiency, symmetry, additivity, and the dummy player (or null player) property, which are widely accepted as defining a fair distribution.

This method is used in many fields, from dividing profits in business partnerships to understanding feature importance in machine learning.

Definition Suppose we have a situation where players can win certain rewards by cooperating (forming a coalition) to accomplish a task; such situations are often called coalitional games. For a coalition (set of players) S, we define the payoff or value function v(S) as the total sum of payoffs that the members of S can obtain by cooperating. The Shapley value is one way to divide up the value created by a coalition between its members. It is a "fair" distribution in the sense that it is the only distribution with certain desirable properties (listed below). According to the Shapley value, the amount that player i is given in a coalitional game (v,N) is

φi(v)=∑S⊆N∖{i}|S|!(n−|S|−1)!n!(v(S∪{i})−v(S)) =1n∑S⊆N∖{i}(n−1|S|)−1(v(S∪{i})−v(S)) where n is the total number of players and the sum extends over all subsets S of N not containing player i, including the empty set. Also note that (nk) is the binomial coefficient. The formula can be interpreted as follows: imagine the coalition is formed one actor at a time, with each actor demanding their contribution v(S∪{i})−v(S) as a fair compensation, and then for each actor take the average of this contribution over the possible different permutations in which the coalition can be formed. An alternative, equivalent formula for the Shapley value is:

φi(v)=1n!∑R[v(PiR∪{i})−v(PiR)] where the sum ranges over all n! orders R of the players and PiR is the set of players in N which precede i in the order R.

In terms of synergy

From the characteristic function v one can compute the synergy (Harsanyi dividend) that each group of players provides. The synergy is the unique function w:2N→ℝ, such that

v(S)=∑R⊆Sw(R) for any subset S⊆N of players. In other words, the 'total value' of the coalition S comes from summing up the synergies of each possible subset of S. Given a characteristic function v, the synergy function w is calculated via

w(S)=∑R⊆S(−1)|S|−|R|v(R) using the Inclusion exclusion principle. The Shapley values are given in terms of the synergy function by

φi(v)=∑i∈S⊆Nw(S)|S| where the sum is over all subsets S of N that include player i. This can be interpreted as

φi(v)=∑coalitions including isynergy of the coalitionnumber of members in the coalition In other words, the synergy of each coalition is divided equally between all members. This can be interpreted visually with a Venn diagram. In the first example diagram above, each region has been labeled with the synergy bonus of the corresponding coalition. The total value produced by a coalition is the sum of synergy bonuses of the composing subcoalitions - in the example, the coalition of the players labeled "You" and "Emma" would produce a profit of 30+20+40=90 dollars, as compared to their individual profits of 30 and 20 dollars respectively. The synergies are then split equally among each member of the subcoalition that contributes that synergy - as displayed in the second diagram.

Examples

Business example Consider a simplified description of a business. An owner, o, provides crucial capital in the sense that, without him/her, no gains can be obtained. There are m workers w1,...,wm, each of whom contributes an amount p to the total profit. Let

N={o,w1,…,wm}. The value function for this coalitional game is

v(S)={(|S|−1)pif o∈S,0otherwise. Computing the Shapley value for this coalition game leads to a value of ⁠mp/2⁠ for the owner and ⁠p/2⁠ for each one of the m workers. This can be understood from the perspective of synergy. The synergy function w is

w(S)={p,if S={o,wi}0,otherwise so the only coalitions that generate synergy are one-to-one between the owner and any individual worker. Using the above formula for the Shapley value in terms of w we compute

φwi=w({o,wi})2=p2 and

φo=∑i=1mw({o,wi})2=mp2 The result can also be understood from the perspective of averaging over all orders. A given worker joins the coalition after the owner (and therefore contributes p) in half of the orders and thus makes an average contribution of p2 upon joining. When the owner joins, on average half the workers have already joined, so the owner's average contribution upon joining is mp2.

Glove game The glove game is a coalitional game where the players have left- and right-hand gloves and the goal is to form pairs. Let

N={1,2,3}, where players 1 and 2 have right-hand gloves and player 3 has a left-hand glove. The value function for this coalitional game is

v(S)={1if S∈{{1,3},{2,3},{1,2,3}};0otherwise. The formula for calculating the Shapley value is

φi(v)=1|N|!∑R[v(PiR∪{i})−v(PiR)], where R is an ordering of the players and PiR is the set of players in N which precede i in the order R. The following table displays the marginal contributions of Player 1.

Order RMC11,2,3v({1})−v(∅)=0−0=01,3,2v({1})−v(∅)=0−0=02,1,3v({1,2})−v({2})=0−0=02,3,1v({1,2,3})−v({2,3})=1−1=03,1,2v({1,3})−v({3})=1−0=13,2,1v({1,3,2})−v({3,2})=1−1=0 Observe

φ1(v)=(16)(1)=16. By a symmetry argument it can be shown that

φ2(v)=φ1(v)=16. Due to the efficiency axiom, the sum of all the Shapley values is equal to 1, which means that

φ3(v)=46=23.

Properties The Shapley value has many desirable properties, including satisfying the four properties of efficiency, symmetry, linearity and null player (or dummy player).

Efficiency The sum of the Shapley values of all agents equals the value of the grand coalition, so that all the gain is distributed among the agents:

… excerpt ends here. Continue reading the full article.

Illustrations

Shapley value: Lloyd Shapley in 2012
Lloyd Shapley in 2012
Shapley value: Venn diagram displaying synergies for Shapley values
Venn diagram displaying synergies for Shapley values
Shapley value: Venn diagram of the division of synergies that sum to the Shapley Value
Venn diagram of the division of synergies that sum to the Shapley Value

Worked examples

Example 1 — a first encounter with Shapley value

Start with the simplest possible case. Write down what Shapley value claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Shapley value before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Shapley value ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Shapley value

In research
Shapley value appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Shapley value in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Shapley value is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cooperative games, Fair division, Lloyd Shapley, so understanding it makes those chapters shorter.
In everyday life
Look for Shapley value outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Shapley value” →

How to study Shapley value in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Shapley value means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Shapley value out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Shapley value in simple terms?

In cooperative game theory, the Shapley value is a method (solution concept) for fairly distributing the total gains or costs among a group of players who have collaborated. For example, in a team project where each member contributed differently, the Shapley value provides a way to determine how m…

Why does Shapley value matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Shapley value?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Shapley value.

Tags

  • Cooperative games
  • Fair division
  • Lloyd Shapley

Keep exploring