(A) Timing of behavioral events for two consecutive trials (‘previous’ and ‘current’) of the spatial choice task. Gray box shows pre-stimulus epoch, the primary focus of our neurophysiological analyses. (B and C) Behavioral performance conditional on whether the choice on the previous trial was left (B) or right (C), and rewarded or unrewarded, for 1 example mouse (12 sessions). Gray circles and lines include all trials and are identical in B and C, shown for comparison with the conditional data (black). Lines show best-fit logistic functions using the Simple model. (D) Influence of previous choice and outcome on choice behavior for 7 mice (M1-M7), estimated with the Extended model, 1 trial back. Error bars, 95% confidence intervals. (E and F) Improvement in predicting choices realized by including in the behavioral model choices and outcomes 1 trial back (E) and 2 trials back (F) for all seven mice (corresponding to M1-M7 in D). Each symbol represents 1 session. For each session, simulated choices on a test set of trials (50% of trials in the session) were separately generated by three models (Simple model; Extended model, 1 trial back; and Extended model, 2 trial back) in which all regression coefficients were estimated from the remaining trials (in all sessions) for that mouse. The accuracy of each model’s prediction of choices in the test set was calculated as the percentage of trials in which the predicted choice matched the actual choice. This process was repeated, with a new test set, 50 times/session. Each symbol shows the average, across repeats for each session, of the improvement in accuracy of the Extended model, 1 trial back over the Simple model (E), and of the Extended model, 2 trials back over the Extended model, 1 trial back (F). *p<0.0001, one-tailed paired Student’s t test across sessions per mouse.