  Interest in how democracies form consensus has increased recently, with
statistical physics and economics approaches both suggesting that there is
convergence to a fixed point in belief networks, but with fluctuations in
opinions when there are ``stubborn'' voters. We modify a model of opinion
dynamics in which agents are fully Bayesian to account for two cognitive
biases: confirmation bias and in-group bias. Confirmation bias occurs when the
received information is considered to be more likely when it aligns with the
receiver's beliefs. In-group bias occurs when the receiver further considers
the information to be more likely when the receiver's beliefs and the sender's
beliefs are aligned. We find that when there are no cognitive biases, a network
of agents always converges to complete consensus. With confirmation bias alone,
polarization can occur. With both biases present, consensus and polarization
are possible, but when agents attempt to counteract confirmation bias, there
can be signatures of transient chaos and ongoing opinion fluctuations. Based on
this simple model, we conjecture that complex opinion fluctuations might be a
generic feature of opinion dynamics when agents are Bayesian with biases.
