Shapley value (source code)

= Shapley value
{c}
{title2=$\phi_i(v)=\sum_{S\subseteq N\setminus\{i\}}\frac{|S|!(n-|S|-1)!}{n!}\bigl(v(S\cup\{i\})-v(S)\bigr)$}
{wiki}

The <Shapley value> averages each player's <marginal contribution> over uniformly random player orderings. Exactly $|S|!(n-|S|-1)!$ orderings have $S$ immediately before player $i$, giving the formula. The values sum to $v(N)$ by telescoping each ordering. In a <simple cooperative game> this is the <probability> of being pivotal. For a <convex cooperative game>, <Shapley value belongs to the core of a convex game> guarantees a stable allocation as well.