  In recent years online social networks have become increasingly prominent in
political campaigns and, concurrently, several countries have experienced shock
election outcomes. This paper proposes a model that links these two phenomena.
In our set-up, the process of learning from others on a network is influenced
by confirmation bias, i.e. the tendency to ignore contrary evidence and
interpret it as consistent with one's own belief. When agents pay enough
attention to themselves, confirmation bias leads to slower learning in any
symmetric network, and it increases polarization in society. We identify a
subset of agents that become more/less influential with confirmation bias. The
socially optimal network structure depends critically on the information
available to the social planner. When she cannot observe agents' beliefs, the
optimal network is symmetric, vertex-transitive and has no self-loops. We
explore the implications of these results for electoral outcomes and media
markets. Confirmation bias increases the likelihood of shock elections, and it
pushes fringe media to take a more extreme ideology.
