egttools.numerical.numerical_.calculate_expected_payoff

calculate_expected_payoff()

Calculate the expected payoff averaged over the stationary distribution.

E[payoff] = sum_s sd(s) * sum_g P(g|s) * avg_payoff(g)

where avg_payoff(g) = sum_j (g[j] / group_size) * payoff_matrix(j, g_index). Each strategy’s payoff is weighted by its frequency inside the sampled group.

Parameters:
  • pop_size (int) – Total number of individuals in the population.

  • group_size (int) – Number of individuals sampled per group interaction.

  • nb_strategies (int) – Number of strategies available in the population.

  • stationary_distribution (scipy.sparse.csr_matrix) – Sparse matrix representing the stationary distribution over population states.

  • payoff_matrix (numpy.ndarray) – Matrix of shape (nb_strategies, nb_group_compositions); entry (j, g) is the payoff of strategy j when the group composition index is g.

Returns:

Expected payoff scalar.

Return type:

float