Sharedring_game.ipynbOpen in CoCalc
Ring Game, Terri Kneeland (Econometrica 2015)

This page gives you the actual data from Terri Kneeland's experiment on the ring game. The problem is to figure out whether there is any difference between a player who can successfully delete dominated strategies, and a player who best replies to the actual distrbution of play by other players in the experiment.

Apart from providing the data, this page will show you some simple python commands you can use to interpret the data. Then we can do some computations using sagemath.

The first bit just loads some python libraries (particularly pandas - tons of documentation about it on the internet). The os library is for reading files.

import pandas as pd
import os
dataset = pd.read_csv('ecma_data.csv')
show(dataset)
xxxxSubjectxxG1P1xxG1P2xxG1P3xxG1P4xxG2P1xxG2P2xxG2P3xxG2P40xxxxxxxxx1xxxxx1xxxxx3xxxxx2xxxxx3xxxxx1xxxxx1xxxxx2xxxxx31xxxxxxxxx2xxxxx2xxxxx3xxxxx2xxxxx2xxxxx2xxxxx3xxxxx3xxxxx32xxxxxxxxx3xxxxx2xxxxx1xxxxx1xxxxx1xxxxx1xxxxx2xxxxx2xxxxx23xxxxxxxxx4xxxxx3xxxxx1xxxxx2xxxxx2xxxxx1xxxxx2xxxxx2xxxxx34xxxxxxxxx5xxxxx3xxxxx2xxxxx2xxxxx1xxxxx3xxxxx1xxxxx1xxxxx35xxxxxxxxx6xxxxx1xxxxx2xxxxx2xxxxx1xxxxx3xxxxx2xxxxx2xxxxx36xxxxxxxxx7xxxxx1xxxxx2xxxxx1xxxxx1xxxxx1xxxxx2xxxxx3xxxxx37xxxxxxxxx8xxxxx1xxxxx2xxxxx1xxxxx1xxxxx1xxxxx2xxxxx3xxxxx38xxxxxxxxx9xxxxx1xxxxx2xxxxx1xxxxx1xxxxx1xxxxx2xxxxx3xxxxx39xxxxxxxx10xxxxx1xxxxx1xxxxx1xxxxx1xxxxx1xxxxx2xxxxx1xxxxx310xxxxxxx11xxxxx1xxxxx2xxxxx1xxxxx1xxxxx1xxxxx1xxxxx1xxxxx311xxxxxxx12xxxxx3xxxxx2xxxxx1xxxxx1xxxxx1xxxxx2xxxxx1xxxxx312xxxxxxx13xxxxx3x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x69xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx369xxxxxxx70xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx370xxxxxxx71xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx371xxxxxxx72xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx372xxxxxxx73xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx373xxxxxxx74xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx374xxxxxxx75xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx375xxxxxxx76xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx376xxxxxxx77xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx377xxxxxxx78xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx378xxxxxxx79xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx379xxxxxxx80xxxxx1xxxxx2xxxxx1xxxxx1xxxxx3xxxxx1xxxxx2xxxxx3x[80xrowsxxx9xcolumns]\begin{array}{l} \phantom{\verb!xxxx!}\verb|Subject|\phantom{\verb!xx!}\verb|G1P1|\phantom{\verb!xx!}\verb|G1P2|\phantom{\verb!xx!}\verb|G1P3|\phantom{\verb!xx!}\verb|G1P4|\phantom{\verb!xx!}\verb|G2P1|\phantom{\verb!xx!}\verb|G2P2|\phantom{\verb!xx!}\verb|G2P3|\phantom{\verb!xx!}\verb|G2P4|\\ \verb|0|\phantom{\verb!xxxxxxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|1|\phantom{\verb!xxxxxxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|2|\phantom{\verb!xxxxxxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\\ \verb|3|\phantom{\verb!xxxxxxxxx!}\verb|4|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|4|\phantom{\verb!xxxxxxxxx!}\verb|5|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|5|\phantom{\verb!xxxxxxxxx!}\verb|6|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|6|\phantom{\verb!xxxxxxxxx!}\verb|7|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|7|\phantom{\verb!xxxxxxxxx!}\verb|8|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|8|\phantom{\verb!xxxxxxxxx!}\verb|9|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|9|\phantom{\verb!xxxxxxxx!}\verb|10|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|10|\phantom{\verb!xxxxxxx!}\verb|11|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|11|\phantom{\verb!xxxxxxx!}\verb|12|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|12|\phantom{\verb!xxxxxxx!}\verb|13|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|13|\phantom{\verb!xxxxxxx!}\verb|14|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|14|\phantom{\verb!xxxxxxx!}\verb|15|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|15|\phantom{\verb!xxxxxxx!}\verb|16|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|16|\phantom{\verb!xxxxxxx!}\verb|17|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|17|\phantom{\verb!xxxxxxx!}\verb|18|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|18|\phantom{\verb!xxxxxxx!}\verb|19|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|19|\phantom{\verb!xxxxxxx!}\verb|20|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|20|\phantom{\verb!xxxxxxx!}\verb|21|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|21|\phantom{\verb!xxxxxxx!}\verb|22|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|22|\phantom{\verb!xxxxxxx!}\verb|23|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|23|\phantom{\verb!xxxxxxx!}\verb|24|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|24|\phantom{\verb!xxxxxxx!}\verb|25|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|25|\phantom{\verb!xxxxxxx!}\verb|26|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|26|\phantom{\verb!xxxxxxx!}\verb|27|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|27|\phantom{\verb!xxxxxxx!}\verb|28|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|28|\phantom{\verb!xxxxxxx!}\verb|29|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|29|\phantom{\verb!xxxxxxx!}\verb|30|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|..|\phantom{\verb!xxxxxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\phantom{\verb!xxx!}\verb|...|\\ \verb|50|\phantom{\verb!xxxxxxx!}\verb|51|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|51|\phantom{\verb!xxxxxxx!}\verb|52|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|52|\phantom{\verb!xxxxxxx!}\verb|53|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|53|\phantom{\verb!xxxxxxx!}\verb|54|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|54|\phantom{\verb!xxxxxxx!}\verb|55|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|55|\phantom{\verb!xxxxxxx!}\verb|56|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|56|\phantom{\verb!xxxxxxx!}\verb|57|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|57|\phantom{\verb!xxxxxxx!}\verb|58|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|58|\phantom{\verb!xxxxxxx!}\verb|59|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|59|\phantom{\verb!xxxxxxx!}\verb|60|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|60|\phantom{\verb!xxxxxxx!}\verb|61|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|61|\phantom{\verb!xxxxxxx!}\verb|62|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|62|\phantom{\verb!xxxxxxx!}\verb|63|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|63|\phantom{\verb!xxxxxxx!}\verb|64|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|64|\phantom{\verb!xxxxxxx!}\verb|65|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|65|\phantom{\verb!xxxxxxx!}\verb|66|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|66|\phantom{\verb!xxxxxxx!}\verb|67|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|67|\phantom{\verb!xxxxxxx!}\verb|68|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|68|\phantom{\verb!xxxxxxx!}\verb|69|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|69|\phantom{\verb!xxxxxxx!}\verb|70|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|70|\phantom{\verb!xxxxxxx!}\verb|71|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|71|\phantom{\verb!xxxxxxx!}\verb|72|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|72|\phantom{\verb!xxxxxxx!}\verb|73|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|73|\phantom{\verb!xxxxxxx!}\verb|74|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|74|\phantom{\verb!xxxxxxx!}\verb|75|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|75|\phantom{\verb!xxxxxxx!}\verb|76|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|76|\phantom{\verb!xxxxxxx!}\verb|77|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|77|\phantom{\verb!xxxxxxx!}\verb|78|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|78|\phantom{\verb!xxxxxxx!}\verb|79|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \verb|79|\phantom{\verb!xxxxxxx!}\verb|80|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|3|\phantom{\verb!xxxxx!}\verb|1|\phantom{\verb!xxxxx!}\verb|2|\phantom{\verb!xxxxx!}\verb|3|\\ \phantom{\verb!x!}\\ \verb|[80|\phantom{\verb!x!}\verb|rows|\phantom{\verb!x!}\verb|x|\phantom{\verb!x!}\verb|9|\phantom{\verb!x!}\verb|columns]| \end{array}

You can find Terri's experiment at https://montoya.econ.ubc.ca/Econ306/terri_experiment.pdf. In the game described in that experiment, each of the lettered actions are replaced by a number, either 1,2 or 3. For example, when a subject is playing as Player 4 in game 1, the actions k,l,m are replaced by 1,2,3 in the table above.

Now list the columns that are contained in the table so you know how to refer to them. You use the letters contained between the single quotes.

dataset.columns
Index([u'Subject', u'G1P1', u'G1P2', u'G1P3', u'G1P4', u'G2P1', u'G2P2', u'G2P3', u'G2P4'], dtype='object')

One way to visualize the data is to draw a histogram of the data in the column named 'G1P4', which gives the choices that the subjects made playing as Player 4 in game 1.

dataset.hist('G1P4',bins=3,grid=false)
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7fd773053150>]], dtype=object)

A better way to do it here is this way.

dataset['G1P4'].value_counts().plot(kind='bar')

<matplotlib.axes._subplots.AxesSubplot object at 0x7fd770fb0290>

Of course, we need the raw counts here, so we could also do:

ds = dataset['G1P4'].value_counts(normalize=true)
show(ds) 

1xxxx0.95002xxxx0.03753xxxx0.0125Name:xG1P4,xdtype:xfloat64\begin{array}{l} \verb|1|\phantom{\verb!xxxx!}\verb|0.9500|\\ \verb|2|\phantom{\verb!xxxx!}\verb|0.0375|\\ \verb|3|\phantom{\verb!xxxx!}\verb|0.0125|\\ \verb|Name:|\phantom{\verb!x!}\verb|G1P4,|\phantom{\verb!x!}\verb|dtype:|\phantom{\verb!x!}\verb|float64| \end{array}

Or, if you just want the counts themselves, you would do it this way.

dataset['G1P4'].value_counts()
1 76 2 3 3 1 Name: G1P4, dtype: int64

If you can't see from the code, those are counts of the number of subjects who chose actions 1, 2 or 3 (k,l or m) when they were playing as Player 4 in game 1. Recall the dominant strategy was action k, or 1. Most people did that.

Now what we would like to do is to look at subjects who acting as Player 3 and calculate the best reply against this empirical distribution. Theoretically, a Nash equilibrium is supposed to have the property that each player correctly guesses the probablity with which their opponent will take each of his or her possible actions. If π1,π2\pi_1, \pi_2 and 1π1π21-\pi_1-\pi_2 are the probabilities with which subjects in the rest of the group use action 1(k) or 2(1) or 3(m), then we would use the calculation 20π1+14π2+8(1π1π2) 20\pi_1 + 14\pi_2 +8(1-\pi_1-\pi_2) to be the expected payoff associated with using action 1(h). A similar calculation applies to the other two actions 2 and 3 (j or k in the reading).

Now revert to sagemath to do the calculation as follows.

n((76/80)*20+(3/80)*14+(1/80)*8)
19.6250000000000

If you leave out the n() you get the answer as a fraction. Now we can do the same thing for action i (2):

n((76/80)*16+(3/80)*2+(1/80)*18)
15.5000000000000

Evidently, the best reply to the distribution of actions of the other subjects is the same as the action you get from iterated deletion of dominated strategies, at least when you are playing as Player 3. The problem is to figure out whether this is true for the Players in the other positions and whether it is true for both games. Use the sample code here to figure out an answer.

The second part of this project is to try to test an alternative model with this data. In particular, we'll assume that players just lose interest sometimes, otherwise, they find their actions using iterated deletion of dominated strategies. To illustrate, suppose you are acting as player 3, and you believe that player 4 will play his or her dominant action with probability ρ4\rho_4. With probability 1ρ41-\rho_4, you believe the player just chooses each of his or her actions with equal probability.

As above, this means your payoff when you play action 1(h) is 20ρ1+(1ρ1)(20+14+83) 20\rho_1+(1-\rho_1)(\frac{20+14+8}{3})

What you need to try to figure out is two things. What value of ρ1\rho_1 makes the realized distribution of outcomes {76,3,1} most likely? Second how high does ρ1\rho_1 have to be in order that action 2 becomes a best reply.

In particular, for this second question, the payoff to using action 2 is 16ρ1+(1ρ1)16+2+183 16\rho_1+(1-\rho_1)\frac{16+2+18}{3} What value of ρ1\rho_1 makes this the same as the payoff to action 1 described above. If ρ\rho takes this value, what is the probability that the realized data would come out the way it did.

Of course, we would like to know these same things for the other players. To do this, it seems reasonable to assume that the probability ρ3\rho_3 that applies when player 2 is thinking about player 3 is different than ρ4\rho_4. Intuitively it would seem it should be a little higher, but that is to be checked by looking at the data. Assume when you do this that the probability that a player is inattentive as Player 3 is independent of whether they were independent as player 4.