POLS 4728 home

POLS 4728

Shapley values for credit assignment

Three round, torso-free stick figures simultaneously squeeze their three ballots into the same voting box, labeled VOTE.
Voting application

A SCROLLING EXPLAINER / MAJORITY RULE

Three votes.
One outcome.

Three people vote yes. A proposal needs just two votes to pass.

Everyone helped. But how much credit belongs to each voter?

Scroll to follow the argument

02

Take one
voter away.

Remove A. The remaining pair still passes the proposal. The same happens if we remove B or C.

Each removal changes the outcome by zero. Looking only at the final group leaves us with a puzzle.

03

Start with
the smallest groups.

A coalition is a group of voters whose support we count.

Start with nobody, ∅, then A, B, or C alone. None has enough votes to pass. Give each group a value of zero.

04

The second vote
makes a difference.

Every pair has two votes, so every pair passes. Give each pair a value of one.

An edge means add exactly one voter. Going from B alone to A and B changes failure to success: 0 → 1.

05

Same destination.
Different credit.

Adding the third voter changes nothing. We now have every possible group, and every way to add one voter.

Follow an imagined order: B, then A, then C. A supplies the deciding vote.

06

Count every
possible order.

There are six ways to order three voters. Give each order equal weight.

A’s four joining edges occur 2, 1, 1, and 2 times. Those counts explain their weights.

07

Put the
pieces together.

Multiply each contribution by the fraction of orders in which it occurs. Then add the four terms.

A receives one-third of the total credit.

08 / EXPLORE

The whole
picture.

B and C receive one-third too. Together, their credits sum to the outcome gained: one.

This is a Hasse diagram of the groups of voters. Each edge adds one voter.

Select a voter or inspect a coalition to explore.

See the notation behind the story to connect this picture to the general formula.

09 / THE VALUE FUNCTION

Name the numbers
on the nodes.

When we gave a failing group zero and a passing group one, we were already using a value function.

Call a group S, and call its number v⁡(S). |S| counts the voters in that group.

v⁡(S)={1,if|S|≥20,otherwise

1 means passes. 0 means fails. The proposal always needs two votes.

10 / THE FORMULA

The calculation,
written compactly.

We have already built every part of this weighted average. ϕi⁡(v) is voter i’s Shapley value in the game defined by v. Here N={A,B,C} is the full group, n=3 is its size, and i=A is the voter we follow.

The sum visits every coalition S that leaves A out: ∅, {B}, {C}, and {B, C}. These are the four starting nodes for A’s joining edges.

11 / THE CONTRIBUTION

Read the change
along one edge.

For example, start with S={B}. Adding A gives S∪{A}={A,B}. The contribution is v⁡({A,B})−v⁡({B})=1−0=1.

The bracketed difference in the formula is exactly this change in value. Choose another starting coalition to compare its edge.

12 / BEFORE A

Arrange the voters
before A.

We counted orders one by one. The members of S can arrive in |S|! different orders.

With S={B,C}, B and C can arrive as B then C, or C then B. Both orders use the same edge when A joins.

A factorial counts arrangements: 2! = 2 × 1 = 2.

13 / AFTER A

Arrange the voters
after A.

Of the n voters, |S| arrived before A, and one is A. That leaves n−|S|−1 voters, with (n−|S|−1)! possible orders.

With S=∅, A arrives first. B and C can then arrive in either order.

0! = 1: there is one way to arrange nobody.

14 / THE WEIGHT

Divide by every
possible order.

These are the same paths we highlighted. Multiply the choices before A by the choices after A. That counts complete orders using this particular joining edge.

The denominator n! counts all complete orders. Here 3!=6, so the weight is the matching count divided by six.

15 / THE SAME CALCULATION

Add the edges.
Keep the meaning.

One term for each of A’s four joining edges. Each term is its contribution multiplied by its fraction of the six orders.

The full formula gives the same result: ϕA⁡(v)=13.

For a different game, change the value function v. The meaning of the formula stays the same.

Return to the interactive diagram