The gambler's fallacy has been a notorious showcase of human irrationality in probabilistic reasoning. Recent studies suggest the neural basis of this fallacy might have originated from the predictive learning by neuron populations over the latent temporal structures of random sequences, particularly due to the statistics of pattern times and the precedence odds between patterns. Here we present a biologically-motivated minimal neural network model with only eight neurons. Through unsupervised training, the model naturally develops a bias toward alternation patterns over repetition patterns, even when both patterns are equally likely presented to the model. Our analyses suggest that the way the neocortex integrates information over time makes the neuron populations not only sensitive to the frequency signals but also relational structures embedded over time. Moreover, we offer an explanation for how higher-level cognitive biases may have an early start at the level of sensory processing.