Statistical computations underlying the dynamics of memory updating